A Guide To Customizing The Thematic Theme Framework

Oh, yuck. This is the old, busted guide. Make sure you check out the new, wiki-powered, Thematic Guide.

Default Thematic CSS Styles

The following typographic classes are styled by default and can be used in your post content.

<blockquote class="left">
Floats a pull-quote to the left of your content.

<blockquote class="right">
Floats a pull-quote to the right of your content.

Adding a Home Link

A “Home” link can be added to your menu by filtering the default menu arguments.

  1. // Adds a home link to your menu
  2. // http://codex.wordpress.org/Template_Tags/wp_page_menu
  3. function childtheme_menu_args($args) {
  4.     $args = array(
  5.         'show_home' => 'Home',
  6.         'sort_column' => 'menu_order',
  7.         'menu_class' => 'menu',
  8.         'echo' => true
  9.     );
  10.     return $args;
  11. }
  12. add_filter('wp_page_menu_args','childtheme_menu_args');

Thematic Theme Hooks and Actions

The following theme hooks can be used to modify Thematic through your Child Theme functions.php file or even a custom plugin.

thematic_before()
Located in header.php just after the opening body tag, before anything else.

thematic_aboveheader()
Located in header.php just before the header div.

thematic_header()
This hook builds the content of the header div and loads the following actions: thematic_brandingopen(), thematic_blogtitle(), thematic_blogdescription(), thematic_brandingclose(), thematic_access().

thematic_belowheader()
Located in header.php just after the header div.

thematic_abovecomments()

thematic_abovecommentslist()

thematic_belowcommentslist()

thematic_abovetrackbackslist()

thematic_belowtrackbackslist()

thematic_abovecommentsform()

thematic_show_subscription_checkbox()

thematic_belowcommentsform()

thematic_show_manual_subscription_form()

thematic_belowcomments()

thematic_abovemainasides()

thematic_betweenmainasides()

thematic_belowmainasides()

thematic_abovefooter()

thematic_after()

Removing Thematic Actions

Any Thematic action can be removed by building off of the following code snippet in your Child Theme functions.php.

  1. // Remove default Thematic actions
  2. function remove_thematic_actions() {
  3.     remove_action('thematic_hookname','thematic_actionname',optionalpostitionnumber);
  4. }
  5. add_action('init','remove_thematic_actions');

Thematic Theme Filters

The following theme filters can be used to modify Thematic through your Child Theme functions.php file or even a custom plugin.

thematic_create_doctype()

thematic_doctitle()

thematic_create_contenttype()

thematic_canonical_url()

thematic_use_excerpt()

thematic_use_autoexcerpt()

thematic_create_description()

thematic_show_description()

thematic_create_robots()

thematic_show_robots()

thematic_create_stylesheet()

thematic_head_scripts()
Outputs the links to jQuery plugins included with Thematic. If you don’t like drop-down menus, outright killing the drop downs in your Child Theme is actually pretty easy.

  1. // Filter away the default scripts loaded with Thematic
  2. function childtheme_head_scripts() {
  3.     // Abscence makes the heart grow fonder
  4. }
  5. add_filter('thematic_head_scripts','childtheme_head_scripts');

thematic_dropdown_options()
Filters the link to thematic-dropdowns.js. Overriding and adding to the default drop-down options with your Child Theme is pretty easy too—once you know how to do it.

  1. // Filter the default drop-down options
  2. // http://users.tpg.com.au/j_birch/plugins/superfish/#options
  3. function childtheme_dropdown_options($dropdown_options) {
  4.     return <<<EOD
  5.     <script type="text/javascript">
  6.     jQuery.noConflict();
  7.     jQuery(document).ready(function(){
  8.         jQuery("ul.sf-menu").supersubs({
  9.             minWidth:    12,                                // minimum width of sub-menus in em units
  10.             maxWidth:    27,                                // maximum width of sub-menus in em units
  11.             extraWidth:  1                                  // extra width can ensure lines don't sometimes turn over
  12.                                                             // due to slight rounding differences and font-family
  13.         }).superfish({
  14.             delay:       800,                               // delay on mouseout
  15.             animation:   {opacity:'show',height:'show'},    // fade-in and slide-down animation
  16.         });
  17.     });
  18.     </script>
  19.    
  20. EOD;
  21. }
  22. add_filter('thematic_dropdown_options','childtheme_dropdown_options');

thematic_show_rss()

thematic_show_commentsrss()

thematic_show_pingback()

thematic_show_commentreply()

thematic_time_title()

thematic_time_display()

thematic_sidebar()

thematic_postheader()

thematic_postfooter()

thematic_commenter_link()

thmfooter_theme_link()
If you’re a theme developer looking to publicly release your Thematic Child Theme you can add a link to your Child Theme release page in the Thematic Theme Framework shortcode. Here’s the code snippet you’ll need in your Child Theme functions.php:

  1. // Add a link back to your Child Theme release page in the Thematic Theme Framework shortcode
  2. function childtheme_theme_link($themelink) {
  3.     return $themelink . ' &amp; <a class="child-theme-link" href="http://example.com/" title="Awesome Theme" rel="designer">Awesome Theme</a>';
  4. }
  5. add_filter('thematic_theme_link', 'childtheme_theme_link');

That example will return both the Thematic link and your link. Of course, you can always just return a link to your Child Theme release page alone:

  1. // Add a link back to your Child Theme release page in the Thematic Theme Framework shortcode
  2. function childtheme_theme_link($themelink) {
  3.     return '<a class="child-theme-link" href="http://example.com/" title="Awesome Theme" rel="designer">Awesome Theme</a>';
  4. }
  5. add_filter('thematic_theme_link', 'childtheme_theme_link');