WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to add an additional filter based on a category for posts that have a custom post_type.

For example, I have a page located at /category/tasks that lists all tasks. I need to make it so I can have additional pages that filter even further like /category/tasks/current, category/tasks/future, /category/tasks/past. I can figure out how to get the query to work, I just am not sure how to pick up the type of filter from the URL. (currently it goes to a page not found error when adding the additional word after /tasks)

share|improve this question
How are you getting a page under a category structure? What is category/tasks, a page? ... How are you doing that, i'd expect that to be a category archive.. Some clarification of how you're archieving the current setup would be helpful.. Please.. :) – t31os Feb 4 '11 at 23:35
up vote 2 down vote accepted

If I'm understand the question right.... first login to the admin section. then click on "categories" its in the "Posts" accordion box. When your there you'll see all your categories. Next, following your example, you need to make "current", "future", and "past" all children of "tasks". this should achieve the desired URL. Let me know if I can help any more.

share|improve this answer

While my first suggestion would also be to go with hierarchical categories, from how your question is worded it seems closer to URL endpoints. Please note that it is functionality I heard to be messy and unreliable. :)

See add_rewrite_endpoint() in Codex.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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