Archived topic
Better search results for woocommerce
11 replies · Started by Greg on August 5, 2019
Is there a way to improve the look of the search results?
Mine shows huge images and a long list of 1 column.
Hi there,
the Search page uses the Customizer > Layout > Blog settings - so if you set the blog to 2 columns then your search will display 2 columns for example
I only have Customizer > Layout > Blog
And in blog only Content Type options
Go to Dashboard > Appearance > GeneratePress and make sure you have the Blog module activated. Then you should see the following in Customizer:
Fantastic, that worked.
Any way to hide the description of the product from these results?
In the blog options set the Excerpt length to 0
I did that but it still shows something
Just to confirm, you want the description to show on normal archives but not in search results?
If so can you give this PHP snippet a shot?
add_filter( 'option_generate_woocommerce_settings', function( $options ) {
if ( is_search() ) {
$options['product_archive_description'] = false;
}
return $options;
} );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know :)
Thanks, Leo I tried this but they still show?
If you don't mind it just being hidden then use this CSS:
.search-results .entry-summary {
display: none;
}
Perfect, that works for me. Thank you.
Glad to be of help