Showing “Product Short Description” in “Products by Category” block
-
Hi,
add_action( 'woocommerce_after_shop_loop_item', 'show_products_excerpts', 5 ); function show_products_excerpts() { global $product; echo "<span class='class-name-here'>" . $product->post->post_excerpt . "</span>"; }
I’ve used the above snippet to show the “product short description” data in product grids and it works great on Woocommerce Shop page. Here is the result, you can see “product short description” information on each grid: https://www.nesrinabla.xyz/shop/
But in Gutenberg, when I use “Products by Category” block to make a custom shop page, I can’t see this product short description data on each grid. Should I use another snippet for this? Here is the example page, as you can see there is no product short description on each product cart: https://www.nesrinabla.xyz/shop-custom/
Please help
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Showing “Product Short Description” in “Products by Category” block’ is closed to new replies.