WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/register taxonomy for object type

Description

Add a registered Taxonomy to a registered Post Type.

Usage

 <?php register_taxonomy_for_object_type$taxonomy$object_type ); ?> 

Parameters

$taxonomy
(string) (required) The name of the taxonomy.
Default: None
$object_type
(string) (required) A name of the object type for the taxonomy object.
Default: None

Return Values

(bool) 
True if successful, false if not

Example

<?php register_taxonomy_for_object_type'category''page' ); ?> 

Change Log

Source File

register_taxonomy_for_object_type() is located in wp-includes/taxonomy.php.

Related

See also index of Function Reference and index of Template Tags.