mercredi 2 mars 2016

Wordpress Plugin add_rewrite_rule() not working

Here's my code:

add_action( 'init', 'add_author_rules' );
function add_author_rules() { 
    add_rewrite_rule(
        "/page1\/(\w*)\/part01/g",
        "page1",
        "top");
}

The actual URL is http://ift.tt/21D6lUh.

part1 is just a custom word I wanted to add in the URL (it can be any word), but the URL above is still 404 error.

What is wrong with the above code?

Thanks in advance. Have a good day.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire