Add term to a taxonomy
I’m developing a plugin. At the hook ‘init’ I’m creating a Custom Post Type and a Taxonomy for that CPT. I want to create some default terms to the taxonomy after activating the plugin. But if I create the terms at the hook ‘init’, all the time refreshing the page the terms are created even if I delete or edit the terms. If I create the terms at the hook ‘activate_plugin’ the terms aren’t created because the hook ‘init’ is called after the ‘activate’.
Does somebody know how I can do this? thanks
- The topic ‘Add term to a taxonomy’ is closed to new replies.