This theme was built by a developer, for developers. Built for my self to be precise. I will be adding documentation here, stay tuned. Make sure to get The Terra Jr Theme as well.
I do not recommend editing Terra directly. The Wordpress child theme system is just to useful. If you want to use the Terra Theme system to its fullest, install and activate Terra Jr. Keep the parent theme pristine and do all your customizing in the child.
The Terra Jr Theme has and added bonus of a custom post type factory class, amongst other features. Try to keep the versions of Parent and Child the same. They are meant to act as a team!
Version numbers mirror Twitter Bootstrap's MAJOR.MINOR.PATCH schema. Terra's versioning includes a fourth, representing theme patches: MAJOR.MINOR.PATCH.THEMEPATCH
- HTML5
- Responsive
- Validates W3C
- SSL ready
- Twitter Bootstrap 3.3.0
- Most CSS and Javascript assets loaded from cdnjs.cloudflare.com
- Open sans font loaded from google fonts API, to match Wordpress admin bar
- jQuery 1.9.1
- Shortcode based quick layout system
- Shortcode Bootstrap buttons
- Logo branding custom post type with hover effect
- Side slide out header menu
- SSL switch system to force pages on a secure site to be http, and vice versa
- PHP based cookie system
- Gravity Forms style upgrades
- Owl Slider
- Apple touch icon support
- Parallax script, skrollr.js
- jQuery Waypoints, waypoints.js
- respond.js (IE8 support)
- html5.js (IE8 support)
- Max image size script to prevent huge uploads
The Terra Theme does not use the Wordpress theme options system to save options. I decided that hardcoding the theme options would save on database queries and overhead. All of the theme settings are at the top of the functions.php file, in the form of easily understandable constants.
- Chrome
- Firefox
- Safari
- IE8+
Two javascript files are loaded to support IE8, respond.js and html5.js. Respond.js does not parse CDN loaded files, so bootstrap.min.css is loaded locally.
- Get a copy of Terra and upload it to your themes directory
- Get a copy of Terra Jr and upload it to your themes directory
- Activate Terra Jr
- Rock and Roll
Remove IPhone phone formatting: <meta name="format-detection" content="telephone=no">
If you want to use the theme with CloudFlare's flexible SSL, it's easy, and free. You will need to secure your Wordpress admin area so that the wp admin bar stays secure on the front end. Add the following two lines toward the top of your wp-config.php file.
define('FORCE_SSL_ADMIN',true);
if($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS'] = 'on';
The theme is configurable by modifying this set of constants. It is located in functions.php
System Constants | Default Value | Type | Description |
---|---|---|---|
TER_ERROR_DISPLAY_ON | false | Boolean | Turn PHP error display on. For debugging use only. |
TER_CDN_URL | //cdnjs.cloudflare.com/ajax/libs/ | URL | Location of the CDN library. If you change this, check that the new package location is the same as cdnjs.com |
TER_JQUERY_VERSION | 1.9.1 | Value | Which version of jQuery to load from the CDN. Pass false to load the Wordpress default jQuery verison. |
TER_BOOTSTRAP_VERSION | 3.3.0 | Value | Which version of Bootstrap to load from the CDN. |
TER_BS_IMG_RESPONSIVE | article img,.widget img | jQuery target | Applies the CSS Class img-responsive to dom elements |
TER_GOOGLE_FONT | Open+Sans: 400,400italic,600,600italic | Value | Google Font API Family - Value after "?family=" in the URL. Pass false for default browser fonts. |
Layout Constants | Default Value | Type | Description |
TER_LOGO | terra/graphics/logo.png | URL | Location of logo image used in header and for the login page. |
TER_HEADER_HOME_LINK | title | Option | Header home link options: logo, title, title-desc |
TER_FULL_WIDTH_CLASS | col-sm-12 | CSS | Bootstrap grid - Full width container class. |
TER_PRIMARY_CLASS | col-sm-8 | CSS | Bootstrap grid - Primary container class. |
TER_SECONDARY_CLASS | col-sm-4 | CSS | Bootstrap grid - Secondary container class. |
TER_SECONDARY | right | Option | Sidebar Layout options: left, right, none |
TER_SIDEBARS | Blog Sidebar,Page Sidebar | CSL | Comma separated list of sidebars. Add ',CTA Sidebar' to activate the CTA Sidebar feature. |
WP Related Constants | Default Value | Type | Description |
TER_ADD_HOME_LINK | false | Boolean | Adds a link home to wp_list_pages. Useful if static home page and you want a link on sitemap |
TER_ADMIN_BAR | editor | Option | Show adminbar when user is logged in: all, admin, editor, none |
TER_ADMIN_BAR_LOGIN | false | Boolean | Show adminbar when logged out . |
TER_EXCERPT | false | Boolean | Show the Wordpress excerpt on archive pages not the content. |
TER_EXCERPT_LEN | 40 | Integer | Number of words in the Wordpress excerpt |
TER_TITLE_FORMAT_DEFAULT | false | Boolean | Change pretty page title to wp_title(''). Set to true for Wordpress SEO plugin support |
TER_MAX_IMAGE_SIZE_KB | 1024 | Integer | Wordpress media library max upload size in KB. |
TER_WP_POST_FORMATS | false | CSL | Turn on support in theme, templates include: 'gallery,image,video' |
TER_GF_BUTTON_CLASS | btn btn-info | CSS Class | CSS Class to be applied to Gravity Form buttons |
TER_COPYRIGHT | '© ' . date('Y ') . get_bloginfo('name') | Value | Copyright string for footer |
Feature Constants | Default Value | Type | Description |
TER_ACTIVATE_BACK_TO_TOP | false | Boolean | Back to top button feature. |
TER_ACTIVATE_BRANDING | false | Boolean | Logo/Branding with hover text feature |
TER_ACTIVATE_FAVICONS | false | Boolean | Favicon feature - Use markup and images from: http://realfavicongenerator.net/ |
TER_ACTIVATE_SITE_MOVED | false | PostID | Enter a page ID to act as the site moved warning page. Use for IP/DNS changes. |
TER_ACTIVATE_SSL | false | Value | For mixed content: 'https' or 'http' - Value represents if the site will be mostly secure or non-secure |
TER_ACTIVATE_SLIDER | false | Boolean | Owl slider feature |
TER_ACTIVATE_WAYPOINTS | false | Boolean | Enqueue waypoints.js. Turn this on for the CTA Sidebar feature. |
Experimental Constants | Default Value | Type | Description |
TER_ACTIVATE_SKROLLR | false | Boolean | Enqueue skrollr.js |