layers_get_custom_taxonomy_template

The Layers layers get custom taxonomy template function.

Description

layers_get_custom_taxonomy_template( $template ); 

Parameters (1)

0. $template
The template.

Usage

  1. if ( !function_exists( 'layers_get_custom_taxonomy_template' ) ) { 
  2. require_once '/core/helpers/extensions.php'; 
  3.  
  4. // The template. 
  5. $template = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = layers_get_custom_taxonomy_template($template); 
  9.  

Defined (1)

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

/core/helpers/extensions.php  
  1. function layers_get_custom_taxonomy_template($template) { 
  2.  
  3. // Setup the taxonomy we're looking for 
  4. $taxonomy = get_query_var('taxonomy'); 
  5.  
  6. if ( !in_array( $taxonomy, layers_get_standard_wp_taxonomies() ) ) { 
  7. $term = get_query_var('term'); 
  8.  
  9. $templates = array(); 
  10. if ( $taxonomy && $term ) 
  11. $templates[] = "taxonomy-$taxonomy-$term.php"; 
  12. if ( $taxonomy ) 
  13. $templates[] = "taxonomy-$taxonomy.php"; 
  14.  
  15. $templates[] = "taxonomy.php"; 
  16. $template = layers_locate_plugin_templates($templates); 
  17. // return apply_filters('taxonomy_template', $template); 
  18. return $template;