Skip to content

Instantly share code, notes, and snippets.

@katlove
Created May 31, 2015 15:45
Show Gist options
  • Save katlove/2d8a0a7aca281bbb625d to your computer and use it in GitHub Desktop.
Save katlove/2d8a0a7aca281bbb625d to your computer and use it in GitHub Desktop.
Add the Page Title of the Posts Page in Genesis
// 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