Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #807880

    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

    #809089

    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

    #809703

    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

    #810388

    Hi Obeatone,

    Looks like you got it figured out. Great job! :)

    Best regards,
    Victoria

    #810394

    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

    #810730

    Hi,

    Great, thanks a lot for sharing, much appreciated :-)

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.