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 ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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