-
-
Save nutsandbolts/7377351 to your computer and use it in GitHub Desktop.
Forces Genesis search results to display excerpts no matter what options are chosen in the theme archive settings. Props to @srikat for this one!
This file contains hidden or 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
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'; | |
} |
Thank you, it has helped me !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @srikat for this - this comes up often with my clients who want full posts except in search results.