layers_get_custom_single_template

The Layers layers get custom single template function.

Description

layers_get_custom_single_template( $template ); 

Parameters (1)

0. $template
The template.

Usage

  1. if ( !function_exists( 'layers_get_custom_single_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_single_template($template); 
  9.  

Defined (1)

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

/core/helpers/extensions.php  
  1. function layers_get_custom_single_template($template) { 
  2. global $wp_query; 
  3. $object = $wp_query->get_queried_object(); 
  4.  
  5. if ( !in_array( $object->post_type, layers_get_standard_wp_post_types() ) ) { 
  6. $templates = array('single-' . $object->post_type . '.php', 'single.php'); 
  7. $template = layers_locate_plugin_templates($templates); 
  8.  
  9. // return apply_filters('single_template', $template); 
  10. return $template;