Want more features on Pastebin? Sign Up, it's FREE!
Guest

header.php

By: a guest on Jul 10th, 2013  |  syntax: PHP  |  size: 4.74 KB  |  views: 66  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. [code]
  3. <?php
  4. /**
  5.  * The Header for our theme.
  6.  *
  7.  * Displays all of the <head> section and everything up till <div id="main">
  8.  *
  9.  * @package WordPress
  10.  * @subpackage Twenty_Ten
  11.  * @since Twenty Ten 1.0
  12.  */
  13. ?><!DOCTYPE html>
  14.  
  15. <html <?php language_attributes(); ?>>
  16. <head>
  17. <title><?php
  18.         /*
  19.          * Print the <title> tag based on what is being viewed.
  20.          */
  21.         global $page, $paged;
  22.  
  23.         wp_title( '|', true, 'right' );
  24.  
  25.         // Add the blog name.
  26.         bloginfo( 'name' );
  27.  
  28.         // Add the blog description for the home/front page.
  29.         $site_description = get_bloginfo( 'description', 'display' );
  30.         if ( $site_description && ( is_home() || is_front_page() ) )
  31.                 echo " | $site_description";
  32.  
  33.         // Add a page number if necessary:
  34.         if ( $paged >= 2 || $page >= 2 )
  35.                 echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
  36.  
  37.         ?></title>
  38. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  39.  
  40. <link rel="profile" href="http://gmpg.org/xfn/11" />
  41. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  42. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  43. <?php
  44.         /* We add some JavaScript to pages with the comment form
  45.          * to support sites with threaded comments (when in use).
  46.          */
  47.         if ( is_singular() && get_option( 'thread_comments' ) )
  48.                 wp_enqueue_script( 'comment-reply' );
  49.  
  50.         /* Always have wp_head() just before the closing </head>
  51.          * tag of your theme, or you will break many plugins, which
  52.          * generally use this hook to add elements to <head> such
  53.          * as styles, scripts, and meta tags.
  54.          */
  55.         wp_head();
  56. ?>
  57.  
  58. </head>
  59.  
  60. <body <?php body_class(); ?>>
  61. <div id="wrapper" class="hfeed">
  62.         <div id="header">
  63.                 <div id="masthead">
  64.  
  65.                         <div id="branding" role="banner">
  66. <!--Put the wowslider code below this to make the slider appear on top of the main page-->
  67.  
  68.                                 <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
  69.                                 <<?php echo $heading_tag; ?> id="site-title">
  70.                                         <span>
  71.                                                 <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
  72.                                         </span>
  73.                                 </<?php echo $heading_tag; ?>>
  74.                                 <div id="site-description"><?php bloginfo( 'description' ); ?></div>
  75.  
  76. <!--Put the wowslider code below this to make the slider appear on top of the nav bar-->
  77.  
  78.  
  79.  
  80.                         <div id="access" role="navigation">
  81.                           <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
  82.                                 <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>
  83.                                 <?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. */ ?>
  84.                                 <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
  85.                         </div><!-- #access -->
  86. <!--Put the wowslider code below this to make the slider appear below the nav bar-->
  87. <?php wowslider(12); ?>
  88.                                 <?php
  89.                                         // Compatibility with versions of WordPress prior to 3.4.
  90.                                         if ( function_exists( 'get_custom_header' ) ) {
  91.                                                 // We need to figure out what the minimum width should be for our featured image.
  92.                                                 // This result would be the suggested width if the theme were to implement flexible widths.
  93.                                                 $header_image_width = get_theme_support( 'custom-header', 'width' );
  94.                                         } else {
  95.                                                 $header_image_width = HEADER_IMAGE_WIDTH;
  96.                                         }
  97.  
  98.                                         // Check if this is a post or page, if it has a thumbnail, and if it's a big one
  99.                                         if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
  100.                                                         has_post_thumbnail( $post->ID ) &&
  101.                                                         ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
  102.                                                         $image[1] >= $header_image_width ) :
  103.                                                 // Houston, we have a new header image!
  104.                                                 echo get_the_post_thumbnail( $post->ID );
  105.                                         elseif ( get_header_image() ) :
  106.                                                 // Compatibility with versions of WordPress prior to 3.4.
  107.                                                 if ( function_exists( 'get_custom_header' ) ) {
  108.                                                         $header_image_width  = get_custom_header()->width;
  109.                                                         $header_image_height = get_custom_header()->height;
  110.                                                 } else {
  111.                                                         $header_image_width  = HEADER_IMAGE_WIDTH;
  112.                                                         $header_image_height = HEADER_IMAGE_HEIGHT;
  113.                                                 }
  114.  
  115.                                         ?>
  116.  
  117.                                                 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
  118.                                         <?php endif; ?>
  119.                         </div><!-- #branding -->
  120.  
  121.  
  122.  
  123.                 </div><!-- #masthead -->
  124.  
  125.         </div><!-- #header -->
  126.  
  127.         <div id="main">
  128. [/code]
clone this paste RAW Paste Data