Struggling with add_rewrite_rule

I’ve read this:

WordPress redirection to get url friendly

Read More

That led me to this:

1) wp.tutsplus.com/tutorials/creative-coding/the-rewrite-api-the-basics/

2) wp.tutsplus.com/tutorials/creative-coding/the-rewrite-api-post-types-taxonomies/

and per the end of #1, I installed this:

wordpress.org/extend/plugins/monkeyman-rewrite-analyzer/

With the plugin I can see and test the rule I added via add_rewrite_rule. However, when I try the same URL request on the front end site I get a 404. I’m struggling to sort out why the rule isn’t being applied.

p.s. Sorry about the links not being links but my rep from StackOverFlow doesn’t seem to carry over to wp.SE

Related posts

Leave a Reply

1 comment

  1. Have you tried third parameter as “top” into add_rewrite_rule ? Something like this:

    add_rewrite_rule($regex, $redirect, 'top');
    

    And also re-save permalink settings.