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 rewrite some urls:

I have a page (id = 61), with slug anunciantes on wich I use a custom template to generate a wp_query to list a custom post_type.

I need to be able to filter by two different taxonomies, area and category

function rewrite_rules() { 
    /* Tried:
        global $wp_rewrite;
   /* Also tried:
add_action('init', 'rewrite_rules');

But I allways get 404 error if I try:


( I did go to wp-admin -> permalinks -> save changes , I understand it flushes the rewrite rules? )

So, any idea what am I doing wrong?

share|improve this question
Try a plugin for rewrite rules debug, for example Monkeyman Rewrite Analyzer, and see what's going on. – Rarst Jun 9 '14 at 21:55
Did you register your custom query string vars? Read the Important bit in the codex – vancoder Jun 9 '14 at 22:03

Your Answer


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

Browse other questions tagged or ask your own question.