Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_single_template [ WordPress Function ]

get_single_template ( No parameters )
Returns:
  • (string)
Defined at:



Retrieve path of single template in current or parent template.

Source


<?php
function get_single_template() {
    
$object get_queried_object();

    
$templates = array();

    
$templates[] = "single-{$object->post_type}.php";
    
$templates[] = "single.php";

    return 
get_query_template'single'$templates );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics