Created
March 1, 2012 15:25
-
-
Save mattonomics/1950500 to your computer and use it in GitHub Desktop.
Thesis Child Theme - Basic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Iinitial sanity check | |
if (! defined('ABSPATH')) | |
die('Please do not directly access this file'); | |
// Bring in the main functions file so we have access to all the yummy Thesis goodness | |
include_once(TEMPLATEPATH . '/functions.php'); | |
// we encourage you to set up a class. classes are a VERY important part of 2.0, so you need to be familiar with them. | |
class thesis_child_theme_example extends thesis_custom_loop { | |
public function __construct() { | |
// run the parent constructor so we can access the thesis custom loop api | |
parent::__construct(); | |
// run the main init | |
add_action('init', array($this, 'init')); | |
} | |
public function init() { | |
// actions and filters that will run on init. you could put other things here if you need. | |
$this->actions(); | |
$this->filters(); | |
} | |
public function actions() { | |
// add and remove actions here | |
// this will force thesis to generate CSS when the user switches to the child | |
add_action('after_switch_theme', 'thesis_generate_css'); | |
} | |
public function filters() { | |
// add and remove filters here | |
} | |
public function home() { | |
thesis_loop::home(); // remove this line and enter your custom loop | |
} | |
public function archive() { | |
thesis_loop::archive(); // remove this line and enter your custom loop | |
} | |
} | |
new thesis_child_theme_example; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Thesis Theme Example Child | |
Theme URI: http://diythemes.com/plans/ | |
Description: Child theme for the Thesis | |
Author: DIYthemes - Matt Gross | |
Author URI: http://diythemes.com | |
Template: thesis_184 | |
Version: 1.0 | |
*/ | |
/*---:[ body ]:---*/ | |
body { background: #000; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Matt. Having a lot of issues with getting a child theme to work with DIYthemes. Wondering if there is any update to this file? Thank you.