get_post_taxonomies

Retrieve all taxonomies of a post with just the names.

Description

(array) get_post_taxonomies( (int) $post = 0 ); 

Returns (array)

Parameters (1)

0. $post — Optional. (int)
Post ID or WP_Post object. Default is global $post.

Usage

  1. if ( !function_exists( 'get_post_taxonomies' ) ) { 
  2. require_once ABSPATH . WPINC . '/taxonomy.php'; 
  3.  
  4. // Optional. Post ID or WP_Post object. Default is global $post. 
  5. $post = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_post_taxonomies($post); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/taxonomy.php  
  1. function get_post_taxonomies( $post = 0 ) { 
  2. $post = get_post( $post ); 
  3.  
  4. return get_object_taxonomies($post);