I put my blog on a subpage, how do I get page title?

I’ve got my blog setup on a subpage (not the front page) and I’m using the template file home.php, how can I get the contents from the page editor onto this subpage?

If I change the title of the page it changes in the nav menu, but how can I get this to display on the page? (i.e. as the <h1> header)

1 Answer
1

Untested, but try:

<?php
echo get_the_title( get_option( 'page_for_posts' ) );
?>

But it’s somewhat hackish. Really, the page_on_front and page_for_posts are intended to be nothing more than placeholders for the site front page and blog posts index page.

Leave a Comment