Skip to content

Instantly share code, notes, and snippets.

@galengidman
Last active December 25, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save galengidman/7058364 to your computer and use it in GitHub Desktop.
Save galengidman/7058364 to your computer and use it in GitHub Desktop.
Returns the page title of the blog posts page as set in Settings → Reading.
function get_posts_page_title() {
if (get_option('show_on_front') == 'page') {
return get_the_title(get_option('page_for_posts'));
}
return false;
}
@galengidman
Copy link
Author

To use: Paste in functions.php and call: <?php echo get_posts_page_title(); ?>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment