Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 23, 2015 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/39b8e0aeb1465e3bdf4f to your computer and use it in GitHub Desktop.
Save billerickson/39b8e0aeb1465e3bdf4f to your computer and use it in GitHub Desktop.
<?php
// Don't include the <?php, only here for styling the gist
function be_move_grid_image() {
// First, we make sure we're in the grid loop.
if( ! apply_filters( 'is_genesis_grid_loop', false ) )
return;
// Move Featured Image in Genesis 2.x
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
add_action( 'genesis_entry_header', 'genesis_do_post_image', 4 );
// Move Featured Image in Genesis 1.x
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
add_action( 'genesis_before_post_title', 'genesis_do_post_image' );
}
add_action( 'genesis_before_entry', 'be_move_grid_image' ); // For Genesis 2.x
add_action( 'genesis_before_post', 'be_move_grid_image' ); // For Genesis 1.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment