Documentation

View the installation guide, browse the Knowledge Base, find out about hooks, get support

Available since: 1.0

organizewp_taxonomy_object_type_{$taxonomy}

View Parameters »

WordPress allows taxonomies to be registered to an explicit set of object types. By default OrganizeWP registers taxonomies to no explicit object types, which makes those taxonomies generally available but not attached to any specific object types. You can modify this behavior using this hook.

Example: To customize the Taxonomy object type for a Taxonomy managed by OrganizeWP, add the following to your active theme’s functions.php:

Note: this code snippet has been customized for a Taxonomy named authors. You will need to customize your filter tag to include the Taxonomy you would like to work with.

<?php
// Customize the object type for the 'author' taxonomy.
add_filter( 'organizewp_taxonomy_object_type_author', function( $object_type ) {
// Register the author taxonomy to the book post type.
return array( 'book' );
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$object_type Mixed

Provide a string or array of strings and the taxonomy will be registered to those object types

Declutter your WordPress Admin, instantly!

Be empowered when editing your content instead of feeling lost, spend more time on more important things. Get organized today!

Get OrganizeWP