Skip to content

Instantly share code, notes, and snippets.

@JanHoek
Created May 30, 2014 17:41
Show Gist options
  • Save JanHoek/33581cb06847633ac221 to your computer and use it in GitHub Desktop.
Save JanHoek/33581cb06847633ac221 to your computer and use it in GitHub Desktop.
Show manual excerpt after the header on any Page or Post in Genesis
<?php // remove this line
//* Activate Manual excerpt on Pages
add_post_type_support('page', 'excerpt');
//* Show Manual excerpt After Header
function jan_show_manual_excerpt() {
$post = get_post( get_the_ID() );
$the_excerpt = $post->post_excerpt;
if ( !is_singular() || empty( $the_excerpt ) )
return;
echo '<div class="manual-excerpt"><div class="wrap">'.$post->post_excerpt.'</div></div>';
}
add_action ( 'genesis_after_header', 'jan_show_manual_excerpt' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment