Views Base Customization Guide

Child Theming

The base theme is meant to be used as a parent theme for further development. If you are about to do customizations on your own, please proceed further by creating a Child Theme.

Child themes are a WordPress feature that allows you to modify an existing theme and change only the styling and templates that have to be changed. The only required file for a child theme is style.css as this is the place where you define the parent-child relationship.

Our base theme starts with the following header in the style.css section:

/*
Theme Name:Views Base
Theme URI:http://www.onthegosystems.com/
Author:onthegosystems
Author URI:http://www.onthegosystems.com/
...
*/

If our theme folder in wp-content/themes is named views_basetheme, then the following header could be used for style.css of the child theme. Create a folder named, let’s say views_childtheme and use this header:

/*
Theme Name: Views Child
Description: Child theme for the Views Base theme
Author: Your name here
Template: views_basetheme
*/

where the Template corresponds to the folder where the parent theme is located.

More on child themes - http://codex.wordpress.org/Child_Themes


PHP Hooks

Hooks are placeholders in the code left for third party code. Instead of modifying a source directly (and turning the update process into a nightmare), you could use the WordPress action/filter functionality and take advantage of the existing hooks in our base theme.

We have created a list of hooks on our template files so that you could insert your own logic and keep the theme out of trouble when updates are released. You could apply a code inside of your child theme’s functions.php file or via extra plugins.

More on WordPress action hooks: http://codex.wordpress.org/Plugin_API

Hooks list in our Base theme:

footer.php: ( 2 hooks before & after wp_footer() ):
wptypes_base_theme_before_footer
wptypes_base_theme_after_footer

header.php ( 2 hooks before & after wp_head() ):
wptypes_base_theme_before_header
wptypes_base_theme_after_header

sidebar.php ( 2 hooks before & after dynamic_sidebar() ):
views_base_before_ . $name
views_base_after_  . $name

index.php (before the end of content area):
views_base_before_close_content

class_base_theme.php (inside of the Theme Options page):
views_base_options


Override CSS

We provide a Custom CSS block for you to use for CSS changes on the fly. If you already have a child theme based on our base theme, feel free to apply the changes in the style.css file and they will override the styles provided by the base style.css file.