Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ROCKHARBOR base theme for WordPress. This is where all of the actual work for the RH websites is done.
PHP JavaScript CSS Smarty Shell
branch: master

Updates Slick to 1.5.5 to fix IE11/Edge problem

- Slick update to 1.5.5 fixes problem where Slick slides are not clickable
- Separately also fixes problems with FAQ slider arrows on Firefox and in mobile breakpoint
latest commit e20314ed84
@scj1091 scj1091 authored
Failed to load latest commit information.
css Updates Slick to 1.5.5 to fix IE11/Edge problem
elements Adds theme option for Zopim script and appends to end of <head>
img style cleanup, final iconfont
js Adds fallback code to revert SVG to PNG in IE<=8
libs Updates Slick to 1.5.5 to fix IE11/Edge problem
swf Added better RTMP support. Closed #29
tests Removed trailing whitespace
vendors Used gitmodule for S3 class
.gitignore Change sprite to svg icons, mobile style tweaks
.gitmodules Used gitmodule for S3 class
404.php Merge branch 'responsive' into dev
CONTRIBUTING.md Added CONTRIBUTING.md
README.md Added app icon meta
_style.css Added pull quote styles
action.php Initializing theme for actions
archive.php Mobile newsletter & newsletter template
comments.php Finished styling comments
content-curriculum-category.php Added basic curriculum post type
content-curriculum.php Added basic curriculum post type
content-message.php Message single page
content-post.php style cleanup, final iconfont
content-series-first.php style cleanup, final iconfont
content-series.php Messages styles
content-staff.php Merge branch 'responsive' into dev
content.php Added pull quote styles
download.php Facilitating downloads for message media
embed.php Removed trailing whitespace
footer.php Standardizes ROCKHARBOR text to style guide: all one word, all caps. …
front-page.php style cleanup, final iconfont
functions.php Not instantiating unnecessary class
header-prebody.php Adds OpenSearch to support Chrome URL bar site search
header.php Standardizes ROCKHARBOR text to style guide: all one word, all caps. …
index.php style cleanup, final iconfont
opensearch.php Adds OpenSearch to support Chrome URL bar site search
rss.php Removed trailing whitespace
search.php Merge branch 'responsive' into dev
searchform.php Made design work better with lower IE versions. Closed #17
sidebar.php Just kidding, don't want a submenu widget
single-curriculum.php Added basic curriculum post type
single-message.php Lets Message posts embed Vimeo videos
single-staff.php Fixed staff css
single.php Responsive nav fixes
style.css Updates Slick to 1.5.5 to fix IE11/Edge problem
upload.php Added s3 hooks to uploader

README.md

ROCKHARBOR Theme Base

This WordPress theme contains all of the necessary components for creating a subsite. Subsites require a few special files for themselves to customize the colors.

Usage

Directory structure

At the very least, the following files should be created.

/<theme_name>
    /img
        logo.png
        twitter-icon.png
        facebook-icon.png
        favicon.ico
        appicon-114.png
        appicon-144.png
    /libs
        child_theme.php
    functions.php
    style.css

Required files

CSS

The child theme CSS should only contain styles for that child theme that need to be overridden. This usually just includes colors, but can include styles that utilize images.

There is a stylesheet called _style.css that serves as a template for child theme css sheets.

Including the theme class

Also required is a class within /libs called ChildTheme(). It must extend RockharborThemeBase. All that needs to be defined are the $themeOptions as explained in the base class.

Next, create a functions.php file

function _include_theme() {
    require_once 'libs/child_theme.php';
    global $theme;
    $theme = new ChildTheme();
    $theme->init();
}
add_action('after_setup_theme', '_include_theme');

This is required because WordPress doesn't use OOP and includes files in the opposite order one would suspect. It is needed to overwrite the global $theme.

A bit more

There are some images required by the subsites, indicated in the directory structure.

Required configuration

Below is a list of the configuration required in the WordPress backend once the site is created:

  • Menus needs to be created and assigned to the Main and Footer navigation areas
  • Theme options need to be defined, as they do not fall back on the parent theme
  • Site title in Settings > General needs to be defined
  • Under Settings > Reading, change the front page to display a static page and choose your homepage
  • Go to Network Admin (top right), then to Settings and make sure subsites are allowed to upload content

In order to pull Twitter feeds, a Twitter application must be made and the consumer credentials stored in wp-config.php:

define('TWITTER_CONSUMER_KEY', 'my consumer key');
define('TWITTER_CONSUMER_SECRET', 'my secret key');

This allows themes to authenticate Twitter users (usually the site's Twitter account) against the application. The application only needs read permission as all it does it use Twitter's /search/tweets API endpoint.

Front page

The featured stories area above the fold on the front page is controlled by a menu area called "featured." To add a feature, add a menu item to the "featured" area's menu.

Features

Since each site is a child of the main site and can have any feature it has, you must dictate what features you would like the subsite to use using the supports key in the $themeOptions var. Turning a feature on or off does not affect the database.

If you pass $archive == true in the post type's option var, a shortcode will automatically be created for that post type, e.g. [staff]. This will embed the archives for that type using the template content-$post_type.php. For single views, it will use the single-$post_type.php template.

The following features are available:

staff

It also creates various conveniences, including a taxonomy for staff called "department" and meta boxes to organize the information.

To pull from a specific campus, include the campus attribute along with the WordPress blog id (see a list of the sites to get the id). For example, to pull all of the staff from the second blog:

[staff campus="2"]

message

The message post type contains two taxonomies, "series" and "teachers." Series are like categories for the messages, and teachers are the speakers who taught the message. Unlike teachers, only one series can be defined per message.

Aside from the archive-generating [message] shortcode, the message post type comes with a [single-message] shortcode that can be used to show a single message from any campus.

Specialness

YAWPH (yah-ff) Yet Another WordPress Hack - A hack to make WordPress work in the way you might imagine it to, or to work in a way common programming practices would dictate. While much of the site is made up of YAWPHs, I've only begun to document them as of this commit.

Something went wrong with that request. Please try again.