0

I have a section in a plugin i am making where admin can add custom taxonomies and custom post types as required. the admin will create a custom taxonomy by selecting a name(that will be used as slug), then create a custom post type and select the above created taxonomy as it's parent.

those are been added to a private DB table.

On init action('init',)... i have a class that runs through this database and register the custom post type/ taxonomies create previously and register_taxonomy_for_object_type to connect things up.

now my issue is. when the admin go back to the same screen and edit a taxonomy name(which also changes the slug) i update the DB according to the new changes. although my class see the changes and register them,when i refresh the page it doesn't seem to actually change.

My question is: is there anything i need to do to update that taxonomy ?

Sorry for the long text thanks.

  • The test is actually not long enough ;) please show the relevant parts of your code. – Mark Kaplun Jan 25 '14 at 12:25
  • Lol yea i know sorry for that - well the general question would have been if i change the slug of a taxonomy reregister the taxonomy and use register_taxonomy_for_object_type , would i need to use anything else to update it ? – Neta Meta Jan 25 '14 at 12:28
  • You may need to re-save your Permalinks which flushes the cache for the re-write rules. – Brad Dalton Jan 25 '14 at 12:53
  • fixed the issue, it appears that what i were looking for was to change the taxonomy slug. what i did is, ones admin change the name of a taxonomy, update wp-taxonomy table, and search for my old taxonomy value, and updated it to the new one – Neta Meta Jan 25 '14 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.