WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/register taxonomy for object type

Contents

Description

This function adds an already registered Taxonomies to an already registered Post Types. It takes in a name, an object name that it affects. It returns true on success.

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''posts' ); ?> 

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.