Rewrite taxonomy in wordpress url

WordPress Pic

How to Rewrite taxonomy in wordpress url?

Many a time we code the taxonomy in wordpress but later want to change it in the wordpress URL or many a times you see the taxonomy in template which you need to change it to something else.

I wondered how to change but later find the easier way for this, which is below.


Like changing http://wisevision.ro/travel/accommodation_type/amsterdam/to http://wisevision.ro/travel/oferte/amsterdam/

The solution is to have ‘rewrite’ => array(‘slug’ => ‘oferte’, ‘with_front’ => true) in the $args arrays for register_taxonomy function.



About author

Love coding, crazy about logic, like solution architecting and solving problems. Thirsty for knowledge, challenges & most importantly innovation. One of the passionate brain behind SpryOX

Leave a Reply

Your email address will not be published. Required fields are marked *