ThemeShaper Forums » Power Blog

[closed]

How to Remove the Post Title from the About Page

(3 posts)
  1. I am trying to remove the Post Title from the About Me Page (ID=2, slug=about).
    [INSERT frustrated && standard 'I've tried everything for 2 hours' cliche]

    Please, if anyone can see my mistake(s), [DISPLAY down on knees]... please, point it out.

    Thank you.

    // Create post title
    function childtheme_postheader_posttitle() {
        if (is_page(2)) {
            $posttitle = '';
    	} elseif ( (is_single() && !(is_page(2))) && (is_page() && !(is_page(2))) ) {
            $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";
        }
        add_filter('thematic_postheader_posttitle','childtheme_postheader_posttitle');
    } // end thematic_postheader_posttitle
    Posted 11 years ago #
  2. Hi,

    try this one:

    function childtheme_postheader_posttitle($content) {
        if (is_page(2)) {
            return '';
        } else {
            return $content
        }
    }
    add_filter('thematic_postheader_posttitle','childtheme_postheader_posttitle');

    Chris

    Posted 11 years ago #
  3. HA! *THANK YOU!*

    That worked! (I did add a semi-colon at return $content - I can at least get that!)

    Why does that work but what I had before does not? (if you have time, otherwise, I am grateful for your fix).

    Val

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.