Andrzej Karczewski
Andrzej Karczewski

Reputation: 19

How to rewrite URL of Custom Taxonomy in Wordpress?

There are custom posts and taxonomy in my theme (Wordpress). I want to change url of them. At the moment I have sth like this:

www.mypage.pl/catalog/

I need rewrite url like this:

www.mypage.pl/parent/catalog/

I put the code:

'rewrite'         => array(
    'slug'          => 'parent/catalog',
    'with_front'=> false,
    'feed'=> true,
    'pages'=> true
            ),

This works for page www.mypage.pl/parent/catalog/myproduct, but www.mypage.pl/parent/catalog/ isn't.

Upvotes: 2

Views: 420

Answers (1)

Christopher Ross
Christopher Ross

Reputation: 206

Most likely, you just need to flush the permalinks to test your new one out.

After executing your custom post code, run flush_rewrite_rules(); to clear your code and implement your new permalink structure. (you only need to do this once, so remove the code after you've executed it)

http://codex.wordpress.org/Function_Reference/flush_rewrite_rules

Upvotes: 1

Related Questions