Created
July 15, 2017 06:02
-
-
Save topleague/97df38295a24955fa884a5d7c67a3193 to your computer and use it in GitHub Desktop.
Display Excerpt as Page Subtitle in Genesis (Conditionally)
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
//* Display Excerpt as Page Subtitle in Genesis | |
add_action( 'genesis_entry_header', 'leaguewp_page_subtitle', 10 ); | |
function leaguewp_page_subtitle() { | |
if ( is_singular( 'page' ) && has_excerpt() ) { | |
printf( '<p class="excerpts">%s</p>', get_the_excerpt() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment