Home › Forums › Front-end Issues › Page Link for Woocommerce Product Categories › Reply To: Page Link for Woocommerce Product Categories
Instead of using the “Page Link” Field Type, use the “Taxonomy” Field Type instead, and select “product_cat” as the Taxonomy.
If you get the taxonomy by Term ID (rather than as Term Object) you’d need to output your link on the page like this:
<?php echo get_term_link( get_field( ‘featured_page_link’ ) ); ?>
The only issue with this method is if you’re using it in a Repeater, you can’t mix links to product categories with links to pages/posts.
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.