Last active
December 25, 2015 23:39
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_posts_page_title() { | |
if (get_option('show_on_front') == 'page') { | |
return get_the_title(get_option('page_for_posts')); | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use: Paste in
functions.php
and call:<?php echo get_posts_page_title(); ?>
.