Hi,
I’m trying to add the product category between the product name and the price on the woocommerce products list template.
I searched in the back office but I didn’t find anything to do that.
You will find in Private content a picture of what I want to do and the URL of my page.
Thank you very much for your help :)
Regards,
TA
Hey Obeatone,
Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Basilis
Ok, thank you for your answer !
Can you just tell me what php file I have to modify ?
Thank you in advance for your reply !
Regards,
TA
Hi Obeatone,
Looks like you got it figured out. Great job! :)
Best regards,
Victoria
Yes ! :)
For interested people, here the way I did it :
Open the content-product.php file on the Woocommerce template folder, edit it and paste this under do_action( ‘woocommerce_shop_loop_item_title’ );
Line to past :
?><div class=”categorie”>
<?php global $post, $product;
$categ = $product->get_categories();
$term = get_term_by ( ‘name’ , strip_tags($categ), ‘product_cat’ );
echo $term->name; ?> </div><?php
Regards,
TA