After a few more hours, I managed to get it working for the most part using this:
// Move Image Above Post Title
function be_teaser_thumbnail( ) {
if( ! apply_filters( 'is_genesis_grid_loop', false ) )
return;
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
add_action( 'genesis_before_post_title', 'genesis_do_post_image' );
}
add_filter( 'genesis_pre_get_option_image_size', 'be_teaser_thumbnail' );
However, on page 2 and subsequent pages, the first grid item is displaying the image below the title while the rest display it correctly. Thoughts?
You’re not actually filtering the image size, you’re repositioning the image function. Your function is running when an image size is called. So the first post loads the image in the normal location (after the title), and while making that image it repositions the image function for the subsequent posts.
Instead of this:
add_filter( ‘genesis_pre_get_option_image_size’, ‘be_teaser_thumbnail’ );
Use this:
add_action( ‘genesis_before_post’, ‘be_teaser_thumbnail’ );
Thanks so much, Bill. I don’t know why my brain couldn’t wrap itself around that before, but it’s much appreciated. I think I just spent too much time staring at it. Now everything is working the way it should!
For the record, I finally had it working but in the most convoluted way ever – I’m thrilled to switch to something cleaner and easier to troubleshoot if needed down the road. Thanks again!
Where exactly do you put the above code? I want to accomplish the same thing, thumbnail image above post title.
See: http://livelovepasta.com/category/diy/
Thanks in advance for any help.
I added it to my functions.php code but the title is still displaying on top of the thumbnail.
I apologize for all the comments, I also added the code to the page_archive.php and still not working.
Please help, thank you.
@livelovepasta you add this code to functions.php, it’s working for me!
Thanks @nutsandboltsmedia and @bill Erickson
This seems to be the old pre-HTML 5 Genesis 1 code.
Anybody have an update with the new hooks that will work with Genesis 2.0 themes?
Got it working. This displays the titles below the image on my “Staff” custom post type, while leaving my blog archive and other custom post types untouched. It makes use of the correct Genesis 2 (HTML 5) hooks as well:
// Move titles on Staff Custom Post Type archive
add_action( 'genesis_meta', 'move_title_below' );
function move_title_below() {
if (is_page('staff')) {
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
add_action( 'genesis_entry_header', 'genesis_do_post_image', 3 );
}
}
Shout out to http://ahjira.com/move-the-post-image-before-the-post-title-on-genesis-blog-archive-and-search-results-pages/ for the correct hook priorities.