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

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