My first WordPress child theme -OR- quirks in WordPress style.css parent references
Part of the reason I used Thematic at CircuitDesign.info was because of its ability to do a child theme (See: How I used a WordPress Child Theme To Redesign My Blog The Smart Way).
Recently, I upgraded Thematic, and some of my custom RSS feeds disappeared. (I have 3 different RSS feeds at circuitdesign.info depending on the clientele.) Unfortunately, I didn’t take advantage of this function, so I lost the two custom feeds.
This time, I finally made a custom child theme to support these RSS feeds. The important thing I needed to do was add a couple RSS link to the wp_head
function.
I created a new theme directory (thematic-wagh), and added two files to it: style.css
and functions.php
. The style.css
file contains:
/* Theme Name: Thematic-Wagh Theme URI: http://circuitdesign.info/ Description: Child Theme for Thematic Author: PoojanWagh Author URI: http://www.6waghs.net/poojanblog/ Template: thematic Version: 0.1 . This work is released under the GNU General Public License (GPL), version 2: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . */ import url("../thematic/style.css");
Basically, it’s empty and just has the magic incantation to tell WordPress that everything is defined by Thematic. The functions.php file has:
<?php function childtheme_rss() { ?> <link rel="alternate" type="application/rss+xml" href="http://feeds.feedburner.com/AnalogAnalogProfessional" title="Posts for Analog Professionals" /> <link rel="alternate" type="application/rss+xml" href="http://feeds.feedburner.com/AnalogLayperson" title="Tutorial and General Interest Posts" /> <?php } add_action('wp_head', 'childtheme_rss'); ?>
So, as promised, it just adds to RSS links to the wp_head
definition. That was real cool, and it took only 15 minutes to figure out. It would have taken less time, except I got stuck on a quirk in the style.css
definition. When I tried:
Template: Thematic
It didn’t work. WordPress said that template didn’t exist. Note that the Thematic directory has the following definition:
THEME NAME: Thematic THEME URI: http://themeshaper.com/thematic-for-wordpress/ DESCRIPTION: A <a href="http://themeshaper.com/">ThemeShaper</a> theme framework based on work in <a href="http://code.google.com/p/blueprintcss/"> The Blueprint CSS Framework</a>, and by <a href="http://www.pearsonified.com/">Chris Pearson</a>, <a href="http://andy.wordpress.com/">Andy Skelton</a>, <a href="http://www.plaintxt.org/">Scott Allan Wallick</a> and many, many others. Please visit the<a href="http://themeshaper.com/forums/">ThemeShaper Forums</a> if you have any questions about Thematic. VERSION: 0.6.3 AUTHOR: Ian Stewart AUTHOR URI: http://themeshaper.com/ TAGS:three columns,two columns,fixed width,simple,seo,microformats,widgets,framework,options page,hooks,filters,valid XHTML,valid CSS . This work, like WordPress, is released under GNU General Public License, version  2 (GPL). http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . */
So, I thought refering to Thematic with a capital T would work. However, for some reason, you have to make it all lowercase:
Template: thematic
Go figure. Nonetheless, I’m really happy to have stood on the shoulders of giants and to inherit their future advances,