How do I link to an Archive of posts with a specific category?

Hi, my top nav consists of categories (music, style, etc) and I would like the nav items to link to an Archive page consisting of all posts in that category, eg clicking on “music” in the nav will take you to an archive page of all the posts with “music” as the category. My question is, what should the dynamic nav link be? I put Link to: Dynamic Data, then {post_terms_category} but when I click on it nothing happens. Attaching screenshots of my header template and archive template. Please let me know what I am doing wrong! Thanks!


If your adding links manually, you’ll need to add the link url manually.
To get the link, you can query categories (or CPT terms) - and then use: {term_name} for the ‘title’ and {term_url} for the link.

Hello, I am having the same problem and don’t understand your answer.

Here I have a section for my menu. I am using a DIV (called thisone) and adding a query to it.

Screenshot 2024-01-21 at 11.17.20

This is the Query - looking for TERMS (because it’s a CPT with taxonomy ‘Projects’. I want to find all the TERMS in the taxonomy Projects). I want TOP LEVEL PARENTS only - so set Parent = 0 (has no parents). You may not want this.

Finally… my DIV settings are HTML TAG LINK - so I can link the whole DIV. You can see the link is to the TERM_URL (archive page).

Back to the structure… Inside the div I have an icon (the code) - you can ignore. The Basic Text - which includes: {term_name} - so the Taxonomy Name appears.

Screenshot 2024-01-21 at 11.17.20

You can do it all very differently… but the key parts are. An ELEMENT (div, button etc.) with QUERY set to TERMS with TITLE/TEXT/LABEL or whatever - set to TERM_NAME and LINK set to {TERM_URL}

Hope that clarifies.

Thank you for your response. This should work, but it is surprisingly complicated and involved. I would have thought that functionality would be available as an option directly from the text link component. Linking to a post taxonomy is a common practice in WordPress world.

The original question was how to fetch all categories and add them to the menu. You said you had the same issue… but if all you want is to add a link to an archive, then it is available easily. Add a button (or link or whatever) and link to {term_link} - which was also in my previous answer.

If this doesn’t meet your need, perhaps you could describe the need more fully.

Obviously I had not fully understood your response. Sorry about that. Now its clear, thank you.

I’m facing a similar issue and can’t find a solution. I can build a custom function to strip the URL, but that feels overkill.

I have a custom taxonomy and would like to get the slug from it so I can attach it to a button.

I tried things like:

  • {post_terms_service_tag:url}
  • {post_terms_service_tag:link}
  • {echo:post_terms_service_tag('url')}

but had no luck in getting it to work.

What am I missing?