Skip to content

Instantly share code, notes, and snippets.

@topleague
Last active December 3, 2019 07:12
Show Gist options
  • Save topleague/5900e58cb52b41b2c02cd43fd5961cb1 to your computer and use it in GitHub Desktop.
Save topleague/5900e58cb52b41b2c02cd43fd5961cb1 to your computer and use it in GitHub Desktop.
Relocating Elements in Gridified Blog Archives in Business Theme
//# Remove and Relocate Featured Image on Blog & Archive Pages
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
add_action( 'genesis_entry_header', 'genesis_do_post_image', 8 );
// Re-position Category Info on Blog & Archive Pages
add_action('genesis_before_loop','archive_elements_relocation');
function archive_elements_relocation() {
if (is_home() || is_archive() ) {
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
add_action( 'genesis_entry_content', 'genesis_post_info', 8 );
add_action( 'genesis_entry_content', 'genesis_do_post_title', 9);
add_action( 'genesis_entry_content', 'genesis_post_meta', 15 );
}
if (is_single() ) {
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment