When defining a taxonomy I successfully set the slug base for it as well, all via functions.php. However, any change on the slug’s base (via editing functions.php again) is being recognised, i.e. it links to the right new URL, but lead to a 404. The term is still to be found at the original URL. More concrete:
- For the taxonomy slug definition I use
'rewrite' => array( 'slug' => 'countries' )in my functions.php.
- The URL of a term is then e.g.
- I change the slug to
'rewrite' => array( 'slug' => 'regions' ).
- Frontend now links to
www.xxx.com/regions/england, but produces a 404 – the term can still be found at www.xxx.com/countries/england.
Is there a way to savely edit and change the slug sitewide or is it a bug of sorts in WordPress? I tried
flush_rewrite_rules(); in my functions.php after initialisation of the taxonomy, but still no luck.