Let me tell you how you can do so.
For example you have have a plugin X which have created a taxonomy with slug “locations” and you want to change it to “neighborhoods”.
Use the below given code for making this work.
<?php
function add_custom_rewrite_rule_for_taxonomy() {
// the default permalink structure is being used.
if( ($current_rules = get_option(‘rewrite_rules’)) ) {
foreach($current_rules as $key => $val) {
if(strpos($key, ‘locations’) !== false) {
add_rewrite_rule(str_ireplace(‘locations’, ‘neighborhoods’, $key), $val, ‘top’);
} // end if
} // end foreach
} // end if/else
// flush the rewrite rules
flush_rewrite_rules();
}
add_action(‘init’, ‘add_custom_rewrite_rule_for_taxonomy’);
?>
Paste this code in your theme’s functions.php and make the necessary changes.
Please don’t forget to refresh the permalinks after making the changes.