WordPress.org

Support

Support » How-To and Troubleshooting » Posts page title

Posts page title

  • Ok so i have tried and tried, searched and found multiple threads on this but none of them seem to work.

    All i want to do is have a title (as other pages do) on my posts page (as setup in the admin reading options) and to continue having a title (called news) when you click to view a post. Don’t understand why this is so hard but still it seems to be impossible.

    I also don’t understand why the navigation doesn’t remain highlighted when you click to view a post – and is there anyway to make it so?

    My theme is based on the default twentyeleven theme. If anyone can help i will be really really happy!

    Thank you

Viewing 1 replies (of 1 total)
  • Michael

    @alchymyth

    Forum Moderator

    the posts page is done by index.php and has therefore no page title;

    you can retrieve the page title, if you have set a ‘page for posts’, with this code:

    <?php if( is_home() && get_option('page_for_posts') )
    echo '<h1 class="entry-title">'.get_the_title(get_option('page_for_posts')).'</h1>';

    possibly add this into index.php before the loop.

Viewing 1 replies (of 1 total)
  • The topic ‘Posts page title’ is closed to new replies.
Skip to toolbar