WordPress Pic

Rewrite taxonomy in wordpress url

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.

eg.

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.

 

 

Vikram Pawar

Vikram Pawar

Coder by passion..... Thirsty for knowledge, challenges & most importantly innovation. Working with BNP Paribas

Leave a Reply

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