do_action( ‘registered_taxonomy’, string $taxonomy, array|string $object_type, array $args )

Fires after a taxonomy is registered.


Taxonomy slug.
Object type or array of object types.
Array of taxonomy registration arguments.

More Information

registered_taxonomy is a hook triggered after a custom taxonomy has been registered. This hook provides the taxonomy key, the name of the object type for the taxonomy object, and arguments used to register the taxonomy as parameters.


do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );



User Contributed Notes

  1. Skip to note 2 content
     * Example of registered_taxonomy usage
     * @param string $taxonomy Taxonomy key.
     * @param array|string $object_type Name of the object type for the taxonomy object.
     * @param array|string $args Optional args used in taxonomy registration.
    function wporg_registered_taxonomy_example( $taxonomy, $object_type, $args ) {
    	if ( 'customtax' == $taxonomy ) {
    		// Do something after customtax is registered as custom taxonomy
    add_action( 'registered_taxonomy', 'wporg_registered_taxonomy_example', 10, 3 );

You must log in before being able to contribute a note or feedback.