wpseo_get_term_meta

Retrieve a taxonomy term's meta value.

Description

(bool|mixed) wpseo_get_term_meta( (string|object) $term, (string) $taxonomy, (string) $meta ); 

Returns (bool|mixed)

value when the meta exists, false when it does not

Parameters (3)

0. $term (string|object)
Term to get the meta value for.
1. $taxonomy (string)
Name of the taxonomy to which the term is attached.
2. $meta (string)
Meta value to get.

Usage

  1. if ( !function_exists( 'wpseo_get_term_meta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/inc/wpseo-functions-deprecated.php'; 
  3.  
  4. // Term to get the meta value for. 
  5. $term = null; 
  6.  
  7. // Name of the taxonomy to which the term is attached. 
  8. $taxonomy = ''; 
  9.  
  10. // Meta value to get. 
  11. $meta = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpseo_get_term_meta($term, $taxonomy, $meta); 
  15.  

Defined (1)

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

/inc/wpseo-functions-deprecated.php  
  1. function wpseo_get_term_meta( $term, $taxonomy, $meta ) { 
  2. _deprecated_function( __FUNCTION__, 'WPSEO 1.5.0', 'WPSEO_Taxonomy_Meta::get_term_meta()' ); 
  3. return WPSEO_Taxonomy_Meta::get_term_meta( $term, $taxonomy, $meta );