Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.