Last active
December 29, 2015 23:39
-
-
Save srikat/7744576 to your computer and use it in GitHub Desktop.
Show static Page's manual excerpt (if present) below title 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_post_type_support('page', 'excerpt'); | |
add_action ( 'genesis_entry_header', 'sk_show_page_excerpt' ); | |
function sk_show_page_excerpt() { | |
$post = get_post( get_the_ID() ); | |
$the_excerpt = $post->post_excerpt; | |
if ( !is_page() || empty( $the_excerpt ) ) | |
return; | |
echo $the_excerpt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment