Viewing 3 replies - 1 through 3 (of 3 total)
  • Does the page display a title by default?

    If not, try going to the Blog page in Dashboard and adding:
    <h1>Blog</h1>
    before any other content.
    But, you may need to go into the template for blog page and edit php.
    Hope this helps!

    Sorry, adding it to the page content simply doesn’t work. Here is a moderately quick and dirty method (you are using a child theme, right?):
    -Go to your parent theme and get index.php
    -Right after <?php if ( have_posts() ) : ?> add <h1 class=”entry-title”>Blog</h1>
    -Save file in your child theme as “home.php”

    If anyone has code for grabbing the blog page title off the page rather than hardcoding it, that’d be cool too.

    not sure if this is the most elegant way, but it works to output the blog page (posts page) title when a static front page is set:

    <?php
    if( is_home() && get_option('page_for_posts') ) {
    	$blog_page_id = get_option('page_for_posts');
    	echo '<h1>'.get_page($blog_page_id)->post_title.'</h1>';
    }
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding page title to blog page – Twenty Ten theme’ is closed to new replies.