Switch language

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




get_header [ WordPress Function ]

get_header ( $name = null )
Parameters:
  • (string) $name The name of the specialised header.
Uses:
Defined at:



Load header template.

Includes the header template for a theme or if a name is specified then a specialised header will be included.

For the parameter, if the file is called "header-special.php" then specify "special".

Source


<?php
function get_header$name null ) {
    
do_action'get_header'$name );

    
$templates = array();
    if ( isset(
$name) )
        
$templates[] = "header-{$name}.php";

    
$templates[] = 'header.php';

    
// Backward compat code will be removed in a future release
    
if ('' == locate_template($templatestrue))
        
load_templateABSPATH WPINC '/theme-compat/header.php');
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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