By default, Genesis displays the entry title before the featured image on your archive pages like your author, blog, category, search, and tag archives pages:
The code snippets in this tutorial, enable you to move your entry titles so they’re inline with your featured image on any archive page like this:
Here’s 2 code snippets which do the job:
1. You can put this PHP code in your functions file or any archive type template:
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_entry_content', 'genesis_do_post_title', 8 );
2. Or, you can add the following code to your child themes functions file and use conditional tags to target specific archive pages:
add_action( 'loop_start', 'reposition_title' );
function reposition_title() {
if ( ! is_singular()) {
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_entry_content', 'genesis_do_post_title', 8 );
}
}
Leave a Reply