2

You can retrieve a category archive by using a URL scheme like https://example.com/?cat=123. This even works if pretty permalinks are enabled.

What is the equivalent query string for tags?

  • 1
    Possible duplicate of how to query posts by category and tag? – jgraup Nov 2 '16 at 23:31
  • You should look up the documentation for WP_Query parameters, as they're the same as what you're using here, though you'd be better using the pretty permalink versions of tag ID archives. Also, get_term_link() is your friend – Tom J Nowell Nov 3 '16 at 0:34
  • @jgraup This is a different question. – Nabil Kadimi Nov 3 '16 at 0:38
  • To answer you question, there is no cat equivalent for tags, and tags links are in the form tag=slug – Nabil Kadimi Nov 3 '16 at 0:53
  • @TomJNowell Thank you, but the WP_Query parameters suggest that something like https://example.com/?tag_id=123 should work, and it doesn't. – Florian Nov 5 '16 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.