Posted on Leave a comment

How To Add Class To Single Product In WooCommerce Category Page

How To Add Class To Single Product In WooCommerce Category Page 3
5
(1)

If you need to add class to a single product in woocommerce category page, simply go to plugins/woocommerce/templates and copy the file content-product.php to yourtheme/woocommerce

On line 30, you will see the opening <li tag. This is the start of every product in the category page. Simply enter your tag in post_class and you will have your class appears on the category page.

<li <?php post_class("col-md-4 col-xs-6"); ?>>

How To Add Class To Single Product In WooCommerce Category Page 4

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *