Button Link to Term

Hi there,

I would like to create a basic link to a term archive page via a button being clicked.

I have created a Column with a Looper Provider setup via Query Builder with: Product, Taxonomy: Marquees

Then the button I have set to Looper Consumer and then set the URL field to be either Term URL or Archive URL - neither work.

I just want to be able to link to an archive page easily and not via a direct URL that might change.

I think this should be able to be done using the new tools, but I’ve spent a little time on it today and can’t get it to work.

I have looked at get_term_link, but am not sure how to build this into the URL section of a Pro Button.

Would someone be able to advise me on this?

Thanks, Tom.

Hey Tom,

Your Looper is to display products of Marquees. I tried the setup you described and it really won’t work.

What you need to use is Categories query like All Terms then you can use {{dc:term:slug}} in the Consumer.

image

Hope that helps.

Hi @christian

I have done the above, but it doesn’t seem to be able to get it going.

I have setup Column:
image

Button:
image

Button URL Tried all these options:
image
image
image

Added Secure Note if that helps.

Thanks, Tom.

Hello Tom,

I have created one page at your server where I have added a button element and linked the button to the product category page with the help of the dynamic content.
Since you have mentioned the product category ID, I have linked the same product category.

Dynamic Content code
{{dc:term:url term="26"}}

Please find the page URL in the secure note.

Thanks

1 Like

Amazing! Thanks @prakash_s

Just a thought, is it possible to have a button that takes people to a page containing multiple terms?

I.e. Items in a shop with two Terms or Term IDs linked to them?

Thanks, Tom.

Hello Tom,

I am not quite sure what your goal is, would you mind sharing more information? so that we can give you a piece of advice on how you can achieve it. It would be best if you could share the exact page URL with a marking screenshot so that I can understand you properly and help you.

Thanks

Hi @prakash_s

So basically, I would like to be able to direct users to a page whereby multiple items are shown up.

So let’s say I have TVs and Sound Systems as Categories on WooCommerce products.

Each Category has its own Archive page as standard with WP.

However, say I wanted to have both terms shown up on an archive page - both TVs and Sound Systems - is this possible? Either via a button, or a shop link URL type thing :slight_smile:.

Thanks, Tom.

Hello Tom,

You can add two buttons by using the Button element then you can add the separate link for the separate product category. To add the category link you can use the dynamic content code as I have provided.

Please have a look at the given screenshot below.

Front-Page-Content-Pro (1)

Hope it helps
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.