Created
May 31, 2015 15:45
-
-
Save katlove/2d8a0a7aca281bbb625d to your computer and use it in GitHub Desktop.
Add the Page Title of the Posts Page in Genesis
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
// Add the page title of the posts page above the posts on the post page | |
// (But not on the blog template, rather on the posts page set up in Settings --> Reading) | |
add_action( 'genesis_before', 'jh_blog_page_title' ); | |
function jh_blog_page_title() { | |
if ( is_home() ) { | |
add_action( 'genesis_before_content', 'jh_show_blog_page_title_text' ); | |
} | |
} | |
function jh_show_blog_page_title_text() { | |
$title = wp_title('', false); | |
echo '<h1 class="entry-title">' . $title . '</h1>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment