Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Force excerpts in Search results page regardless of Content Archives themes settings in Genesis
add_action( 'genesis_before_loop', 'sk_excerpts_search_page' );
function sk_excerpts_search_page() {
if ( is_search() ) {
add_filter( 'genesis_pre_get_option_content_archive', 'sk_show_excerpts' );
}
}
function sk_show_excerpts() {
return 'excerpts';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.