Last active
March 15, 2018 22:55
-
-
Save ChrisCree/5888660 to your computer and use it in GitHub Desktop.
Genesis doesn't put a page title on the blog page template by default. Here's a a function that will do that for you. Just drop it into your functions.php file.
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
<?php | |
// Don't copy the opening <?php tag above | |
// Add page title to blog page template | |
add_action( 'genesis_before', 'wsm_blog_page_title' ); | |
function wsm_blog_page_title() { | |
if ( is_page_template( 'page_blog.php' ) ) { | |
add_action( 'genesis_before_content', 'wsm_show_blog_page_title_text', 2 ); | |
} | |
} | |
function wsm_show_blog_page_title_text() { | |
echo '<h1 class="entry-title">' . get_the_title() . '</h1>'; | |
} |
You can find the info here: https://wpsites.net/web-design/how-to-add-a-entry-title-to-your-blog-page-or-posts-page/
(sorry - due to the copyright of the site, I can't post the snippet here)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this doesn't seem to work for me too.. :(