Wordpressheader. php documents

Source: Internet
Author: User
Wordpressheader. php file. When you are a beginner in php, you are still confused about the header file (location: wp-content/temes/twentyeleven/header. php) when reading wordpress code ). For more information, see in wordpress header. php.

When you are a beginner in php, you are still confused about the header file (location: wp-content/temes/twentyeleven/header. php) when reading wordpress code ).
I would like to ask you:
In the code of this file and include operations, how can external functions such as bloginfo () and wp_head () be called?
How can this development mode be implemented? I hope you will be grateful for your explanation or materials.
PHP code
  
   section and everything up till  * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */?>
  
  
  
  >
  
  
  <?php    /*     * Print the <title> tag based on what is being viewed.     */    global $page, $paged;    wp_title( '|', true, 'right' );    // Add the blog name.    bloginfo( 'name' );    // Add the blog description for the home/front page.    $site_description = get_bloginfo( 'description', 'display' );    if ( $site_description && ( is_home() || is_front_page() ) )        echo " | $site_description";    // Add a page number if necessary:    if ( $paged >= 2 || $page >= 2 )        echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );    ?>
  
  
  
  
       * tag of your theme, or you will break many plugins, which     * generally use this hook to add elements to  such     * as styles, scripts, and meta tags.     */    wp_head();?>>    
              
   
                    " title="
    " rel="home">
                    
                
               
               ">                
   ID ) &&                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&                            $image[1] >= $header_image_width ) :                        // Houston, we have a new header image!                        echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );                    else :                        // Compatibility with versions of WordPress prior to 3.4.                        if ( function_exists( 'get_custom_header' ) ) {                            $header_image_width  = get_custom_header()->width;                            $header_image_height = get_custom_header()->height;                        } else {                            $header_image_width  = HEADER_IMAGE_WIDTH;                            $header_image_height = HEADER_IMAGE_HEIGHT;                        }                        ?>                    " width="
   " height="
   " alt="" />                
                           
               
                    with-image
   ">                
                               
                   
               
               
                   
                    
                    ">
                    ">
                    
                    
     'primary' ) ); ?>            
   
       
  
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.