Shaun
Shaun

Reputation: 39

Woocommerce do not show product description on catalog page but still show in single product pages

The catalog page gets too cluttered with the product's description and short description ranging in different lengths. This off sets each product differently and I would prefer each product to take up more a less the same space in the catalog grid. Thus I would like to remove the product's description from the catalog page and only show it in the single product page when a user selects a product. If possible I would also prefer the search function to not include text from the product short description. Any suggestion will be much appreciated.

Upvotes: 0

Views: 2028

Answers (1)

Rafael
Rafael

Reputation: 21

function filter_woocommerce_short_description( $post_post_excerpt ) { 
if(is_shop() || is_product_category() ) {
    return false;
} else {
    return $post_post_excerpt; 
}    
};  
// add the filter 
add_filter( 'woocommerce_short_description', 'filter_woocommerce_short_description', 10, 1 ); 

Upvotes: 2

Related Questions