ThemeShaper Forums » Thematic


Changing headers in Thematic

(2 posts)
  • Started 3 years ago by johnflower
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. Wordpress does an awful job of using headings (h1, h2, etc.). The sidebar items should not be using h3 tags for headings. This should be done with styled p's or something.

    Is it possible to change the heading structure in the Thematic child theme functions file?
    I do not understand PHP. Seriously, I tried. I am still trying; I still don't get it.
    I found this piece of code on this forum:

    function remove_title() {
    add_action('init', 'remove_title');
    function my_blogtitle() { ?>
    <h1><?php bloginfo('name'); ?></h1>
    <?php }

    It works wonders for the header, but I'm not sure how to make this same type of thing work on other headings, and other pages. For instance, the tagline of the site is also placed inside an h1 heading. This must change to a paragraph tag.

    The ideal is to have a per-page heading structure. I believe that each document should have a unique h1 heading, although I've settled for having the site's title in h1 at the top, with each document starting off with h2.

    Posted 3 years ago #
  2. like everything w/ thematic it is a matter of finding what generates the content/markup/whatever that you want to change and then deciding determining the appropriate way to edit it- either using the override function, adding a function to a hook, removing a function from a hook, or with a filter. i found the h3 tags are generated in widgets.php by the function thematic_before_title

    // CSS markup before the widget title
    function thematic_before_title() {
    	$content = "<h3 class=\"widgettitle\">";
    	return apply_filters('thematic_before_title', $content);
    // CSS markup after the widget title
    function thematic_after_title() {
    	$content = "</h3>\n";
    	return apply_filters('thematic_after_title', $content);

    so to change this you'd need to add some filters to your child's functions.php

    function child_before_title(){
       return "<p class=\"widgettitle\">"
    function child_after_title(){
       return "</p>\n";

    untested, but it seems like it ought to work

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.