Skip to content

Instantly share code, notes, and snippets.

@srikat
Created April 20, 2015 02:08
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 srikat/38dfc3c501cc2be14e00 to your computer and use it in GitHub Desktop.
Save srikat/38dfc3c501cc2be14e00 to your computer and use it in GitHub Desktop.
Force full width content and move Featured image to Entry Header in Search pages in Genesis.
// Search Results pages
add_action( 'get_header', 'sk_search_full_layout' );
function sk_search_full_layout() {
if ( ! is_search() ) {
return;
}
// Force full width content
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Remove Featured Image from Entry Content and add it in Entry Header above the Post Title
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
add_action( 'genesis_entry_header', 'genesis_do_post_image', 9 );
}
@srikat
Copy link
Author

srikat commented Apr 20, 2015

Screenshot: http://d.pr/i/vguH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment