Home › Forums › Front-end Issues › Get field data in WooCommerce › Reply To: Get field data in WooCommerce
Hi @klevermedia
You can’t echo the_sub_field() function as it already echoing it’s value by itself. Also, you can’t echo a Taxonomy field because it is an object, not a string. I think you can do it like this:
$theTerms = get_sub_field('category_button_url');
echo get_term_link( $theTerms );
This page should give you more idea about it: http://www.advancedcustomfields.com/resources/taxonomy/.
I hope this helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.