Switch language

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




get_archive_template [ WordPress Function ]

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



Retrieve path of archive template in current or parent template.

Source


<?php
function get_archive_template() {
    
$post_type get_query_var'post_type' );

    
$templates = array();

    if ( 
$post_type )
        
$templates[] = "archive-{$post_type}.php";
    
$templates[] = 'archive.php';

    return 
get_query_template'archive'$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