0

I want to display posts in certain category only with given tag. Problem with parsing url slugs.

For example, I have category named 'Clothes':

example.com/clothes/

I can get posts in this category with tag 'red' by getting url parameters, like that:

example.com/clothes/?tag=red

But I want to use slugs for that, no get parameters. Examples:

example.com/clothes/tag/red

example.com/clothes/tag/large

How I can do that?

0

You must use add_rewrite_rule() method, or add_rewrite_endpoint() in order to flush rewrite rules, and links you must generate with add_query_arg() method for ugly urls, for tiny u must simple concatenate with permalink

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.