Registered taxonomy WordPress do Action Work with Example

please click here for more wordpress cource

Custom Taxonomy Registeration is a hook triggered when after a custom taxonomy has been registered then Work this Hook. This hook provides these parameter like

  • Taxonomy key
  • Name of the taxonomy object
  • Arguments Used for registration

Example:

You can see here Registere Taxonomy Code

function wpaccuracy_registered_taxonomy_example( $taxonomy, $object_type, $args ) {
    if ( 'customtax' == $taxonomy ) {
        // registered as custom taxonomy
    }
}
add_action( 'registered_taxonomy', 'wpaccuracy_registered_taxonomy_example', 10, 3 );

You may also like...

Popular Posts

Leave a Reply

Your email address will not be published. Required fields are marked *