Skip to content

Instantly share code, notes, and snippets.

@topleague
Created September 14, 2017 02:25
Show Gist options
  • Save topleague/e378b0f660bbc2a36cb55cec3be5f60e to your computer and use it in GitHub Desktop.
Save topleague/e378b0f660bbc2a36cb55cec3be5f60e to your computer and use it in GitHub Desktop.
Hook Entry Title, Post Info, Post Meta to Entry Content // Featured Image to Entry Header
// Add the following code to your functions.php
// Hook Featured Image to Entry Header
add_action( 'genesis_entry_header', 'featured_post_image', 5 );
function featured_post_image() {
if ( !is_singular( array( 'post', 'page' ) )) return;
the_post_thumbnail('post-image');
}
//* Remove the entry title in the entry header
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
//* Hook entry header to entry content
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
add_action( 'genesis_entry_content', 'genesis_do_post_title', 5);
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
//* Remove the post info in the entry header
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
//* Hook post info to entry content
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
add_action( 'genesis_entry_content', 'genesis_post_info', 9 );
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
//* Remove the post meta in the entry footer
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
//* Hook post meta to entry content
add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
add_action( 'genesis_entry_content', 'genesis_post_meta', 12 );
add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment