Advertisement
alchymyth

'header' twenty ten

Apr 26th, 2011
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.94 KB | None | 0 0
  1. <div id="header">
  2.         <div id="masthead">
  3.             <div id="branding" role="banner">
  4.                 <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
  5.                 <<?php echo $heading_tag; ?> id="site-title">
  6.                     <span>
  7.                         <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
  8.                     </span>
  9.                 </<?php echo $heading_tag; ?>>
  10.                 <div id="site-description"><?php bloginfo( 'description' ); ?></div>
  11.  
  12.                 <?php
  13.                     // Check if this is a post or page, if it has a thumbnail, and if it's a big one
  14.                     if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
  15.                             has_post_thumbnail( $post->ID ) &&
  16.                             ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
  17.                             $image[1] >= HEADER_IMAGE_WIDTH ) :
  18.                         // Houston, we have a new header image!
  19.                         echo get_the_post_thumbnail( $post->ID );
  20.                     elseif ( get_header_image() ) : ?>
  21.                         <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
  22.                     <?php endif; ?>
  23.             </div><!-- #branding -->
  24.  
  25.             <div id="access" role="navigation">
  26.               <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
  27.                 <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
  28.                 <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
  29.                 <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
  30.             </div><!-- #access -->
  31.         </div><!-- #masthead -->
  32.     </div><!-- #header -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement