Home Forums Themes Support Claue Add another info on product listing

Topic Resolution: Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #15877

      Hello Jan Studio Team,

      Happy New Year ! Hope you are doing well !

      I Would like to add another info on my catalog for every product I have. Between the product title and the product price, I would like to add : “Par %tag%”

      For instance for this product : https://manora.co/produit/bague-hirondelle/ my tag is Ombre Claire so on the product list I would like to see :

      Bague Hirondelle Argent

      Par Ombre claire (in italic if possible)

      53€

      See also the picture even if I did not do it really well !

      Is that possible ?

      Thank you very much

      Best,

      laurie

      Attachments:
      You must be logged in to view attached files.
    • #15879

      PS : And I would like the people to be redirect to the tag page if they click on the tag

    • #15888

      Hi,

      Please add below code in claue-child > functions.php

      add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_product_loop_tags', 5 );
      
      function woocommerce_product_loop_tags() {
          global $post, $product;
      
          $tag_count = sizeof( get_the_terms( $post->ID, 'product_tag' ) );
      
          echo $product->get_tags( ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', $tag_count, 'woocommerce' ) . ' ', '.</span>' );
      }

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #15897

      Hello,

      I added the code but nothing changed to my website apparently :(.

      Could you help ?

      Thanks a lot,

      Best,

      Laurie

    • #15905

      I help you added code.

      Please check, If you want change text please go to Appearance > Editor > Function

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #15913

      Hello,

      Thanks a lot,

      Have a good day,

      Laurie

Viewing 5 reply threads

You must be logged in to reply to this topic.