In the members-only forum a user asked:
Your tutorial “Custom Search Template in Genesis showing Results Grouped by Post Types” helped me a great deal, but now I would like to show those search results in a grid format of 4 across, showing only featured image and title.
How would I implement this?
In this tutorial we shall display search results in Genesis grouped by specific post types with the entries appearing in a grid, based on Custom Search Template in Genesis showing Results Grouped by Post Types article.
Step 1
Add the following in child theme's functions.php:
// Register a custom image size for images on search result archives
add_image_size( 'search-image', 280, 180, true );
// Force full content layout on search result archives
add_action( 'get_header', 'sk_force_layout' );
function sk_force_layout() {
if ( ! is_search() ) {
return;
}
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
}
Step 2
Create a file named search.php in the child theme directory having the following code:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Thank you so much for this Sridhar! I think you have the best membership site EVER.