ThemeShaper Forums » Thematic

Filtering "thematic_postheader"

(1 post)
  • Started 9 years ago by jesterworld
  • This topic is resolved
  1. This code seems pretty straight forward. In fact, I copied it from the thematic function library and just deleted and rearranged it how I needed it. For some reason when I put it in WordPress, I just get a blank screen. Is there something obvious that I'm overlooking?

    // Information in Post Header
    function slr_postheader($postheader) {
        global $id, $post, $authordata;
    
        $postmeta = '<div class="entry-meta">';
        $postmeta .= '<span class="entry-date"><abbr class="published" title="';
        $postmeta .= get_the_time(thematic_time_title()) . '">';
        $postmeta .= get_the_time(thematic_time_display());
        $postmeta .= '</abbr></span>';
        $postmeta .= "</div><!-- .entry-meta -->\n";
    
        if (is_single() || is_page()) {
            $posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
        } elseif (is_404()) {
            $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
        } else {
            $posttitle = '<h2 class="entry-title"><a href="';
            $posttitle .= get_permalink();
            $posttitle .= '" title="';
            $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
            $posttitle .= '" rel="bookmark">';
            $posttitle .= get_the_title();
            $posttitle .= "</h2>\n";
        }
    
        if ($post->post_type == 'page' || is_404()) {
            return $posttitle;
        } else {
            return $postmeta.$posttitle;
        }
        return $postheader;
    
    } // end slr_postheader
    add_filter ('thematic_postheader', 'slr_postheader');

    thanks!
    Brandon

    Posted 9 years ago #

RSS feed for this topic

Reply

You must log in to post.