-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Screenshot: http://d.pr/i/vguH