Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    As far as I know the term description is for admin purposes only.

    In order to get that to show up on the archive view on the front end, you’d need to customise the default WooCommerce template pages. A good starter guide on customising WooCommerce templates can be found at https://docs.woocommerce.com/document/template-structure/

    Thread Starter mdw

    (@yamaryam)

    h that is too bad! you should display it in future versions.
    I will try to play with the templates, thank you

    Thread Starter mdw

    (@yamaryam)

    what function would it be?

    My theme already shows the description.

    Suggest not editing templates. Add this to functions.php for your child theme:

      add_action ( 'woocommerce_archive_description', 'show_tag_description', 20 );
      function show_tag_description() {
        if ( is_product_tag() ) {
          $term_id = get_queried_object()->term_id;
          echo tag_description( $term_id );
        }
      }
    
    Thread Starter mdw

    (@yamaryam)

    Thank you so much! My theme also show it for categories and tags but not for attribute terms. From your code and from the codex reference I made up this function and it works :

       add_action ( 'woocommerce_archive_description', 'show_term_description', 20 );
      function show_term_description() {
          echo term_description( $term_id, $taxonomy );
        }

    Also few minutes before I was able to display it also by inserting a line in a copy of archive-product.php in my child theme

    Happy it works now!

    Thread Starter mdw

    (@yamaryam)

    I don’t think it is for admin purpose only since I got this answer from WooCommerce:

    Laurena (WooCommerce)
    Jan 9, 18:12 EST
    Hello,
    Thank you for contacting WooCommerce! I’m happy to help answer this for you.
    Unfortunately, how that displays – and even if it displays – is fully dictated by the theme you are using. You may want to be in touch with the theme developer and see if it is possible to customize?
    Unfortunately we are unable to provide support for this sort of customization under our Support Policy.
    However, if you do want to pursue this and want some developer input, we recommend that you contact one of the following services regarding custom development for your site:
    ? WooExperts
    ? Codeable
    Hopefully you will find someone there that can help!
    Best,
    Laurena – Happiness Engineer
    WooCommerce, part of the Automattic Family

    @yamaryam

    Hi Marie,

    Thank you! Your solution helped me so much!

    I added your action to my functions file:

    add_action ( 'woocommerce_archive_description', 'show_term_description', 20 );
      function show_term_description() {
          echo term_description( $term_id, $taxonomy );
        }

    Now, the Description shows on a Product Attribute Archive Page
    https://www.sandtonaesthetics.co.za/store/pa_skin-type/combination-skin/

    However, with the action in place, the Description is now being duplicated on Product Tag Archive Pages:
    https://www.sandtonaesthetics.co.za/store/product-tag/acne/

    Any ideas how I can rectify that one?

    Thanks

    • This reply was modified 8 years, 1 month ago by peyote.
    wizard247

    (@wizard247)

    @yamaryam

    Hi Marie,

    What line did you add to your archive-product.php? I still can’t get this to work. ??

    Thank you,
    Louise

    Are you using this code for variable products? I’ve been looking for a solution to at least have this option. I’ve modded the variations template so that the label and select box are in their own row. The goal is to mimic the display of the product add-ons plugin and to optionally display a description under the label for each variation attribute.

    Yes I used the simple product code for different items so you are correct on that issue but I really just want access to my woocommerce products on my phone
    Is that possible? So I can correct the product issues myself?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Display the Attribute Terms Description in Woocommerce product archive pages’ is closed to new replies.