Hide Product Short Description from Search Archive Results

Hi,

Almost all my short product descriptions are bullet style lists as opposed to my long descriptions which are paragraphs. I’d either like to hide short descriptions from the search archive results, or have them display a snippet of the long description instead.

It just looks bad as regular pages and posts have paragraphs and take up much less space than the bulleted short descriptions.

Please let me know if posssible.

Jesse @ USAT

Hi Jess,

Thanks for reaching out.

Woocommerce uses Wordpress’ default excerpt feature for product short description, switching to longer decription or full description will require Woocommerce template customization that we can’t provide here in the forum. But if it’s just hiding the excerpt or short descriptio, then you can simply add this small CSS to Theme options > CSS

.search-results .excerpt,
.archive .excerpt {
display: none !important;
}

That is assuming you’re referring to Wordpress standard search result page. If it’s a 3rd party search feature then I recommend contacting the author.

Hope this helps.

I’m looking to ONLY hide the excerpts from product pages that appear in the regular WP search. If it’s not a post type = product than I want the excerpt to display as normal.

Hey Jesse,

In that case you can replace the previous code with the following:

.search-results .product .excerpt {
    display: none;
}

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Here are some related links for further reading, this could help you in finding and implementing some CSS fixes:

Hope this helps!

Yes, that helps greatly. It massively condenses the search results to make them easier to skim. Thank you.

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.