Title: Echo a tag-list
Last modified: January 15, 2019

---

# Echo a tag-list

 *  Resolved [alauer](https://wordpress.org/support/users/alauer/)
 * (@alauer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/echo-a-tag-list/)
 * Hi
    i tried to echo a list of tags in a certain template part. Templatepart: 
   woocommerce/templates/single-product/tabs/additional-information.php
 * Code: `<?php
    if(get_the_tag_list()) { echo get_the_tag_list(‘<ul><li>’,'</li
   ><li>’,'</li></ul>’); } ?> `
 * But there is no output although the products do have tags assigned.
    I can echo“
   Hello World” or any other textstrings or HTML but when it comes to PHP nothing
   gets printed.
 * What have i done wrong?
 * kind regards axel

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [7 years, 4 months ago](https://wordpress.org/support/topic/echo-a-tag-list/#post-11095139)
 * Hi Axel,
 * These look promising: [https://stackoverflow.com/questions/31904758/woocommerce-get-product-tags-in-array/31905059](https://stackoverflow.com/questions/31904758/woocommerce-get-product-tags-in-array/31905059)&
   [https://stackoverflow.com/questions/40193472/i-need-to-get-all-tags-from-woo-commerce-products-in-a-page](https://stackoverflow.com/questions/40193472/i-need-to-get-all-tags-from-woo-commerce-products-in-a-page)
 * I am marking this as resolved, but feel free to follow up or open a new thread
   anytime.
 *  Thread Starter [alauer](https://wordpress.org/support/users/alauer/)
 * (@alauer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/echo-a-tag-list/#post-11095606)
 * Hi Con and thanx for helping
    as i am not very firm in PHP i would like to step
   back i bit to clearify possible misunderstandings on my end.
 * 1: The product XY has the tags “india, asia, landscape” assigned to it.
    2: On
   the products page i want to echo only these tags – not all tags of all products
 * Question 1:
    What is the correct function to do that? `get_tag(), get_tag_link(),
   get_tags(), get_the_tag_list(), get_the_tags(), the_tags()`
 * Question 2:
    I would like to get them echoed as links (linking to the tag of 
   the tag-archive) under the short-description. What is the correct template-part
   to do that?
    -  This reply was modified 7 years, 4 months ago by [alauer](https://wordpress.org/support/users/alauer/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Echo a tag-list’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [alauer](https://wordpress.org/support/users/alauer/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/echo-a-tag-list/#post-11095606)
 * Status: resolved