Created
May 20, 2017 20:42
-
-
Save themeblvd/a4c24dd06e74f5cbb07be36a3231b803 to your computer and use it in GitHub Desktop.
When using a theme with Theme Blvd framework 2.5+, this will adjust search results to use the post grid display.
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
<?php | |
/** | |
* Display search results in a grid. | |
*/ | |
function my_the_loop_args( $args ) { | |
if ( is_search() ) { | |
$args['context'] = 'grid'; | |
} | |
return $args; | |
} | |
add_filter( 'themeblvd_the_loop_args', 'my_the_loop_args' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment