Advertisement
adsleeblythe

header.php featured image header image

Oct 26th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.64 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <html <?php language_attributes(); ?>><head>
  4.  
  5.     <title><?php if ( is_category() ) {
  6.  
  7.         echo 'Category Archive for &quot;'; single_cat_title(); echo '&quot; | '; bloginfo( 'name' );
  8.  
  9.     } elseif ( is_tag() ) {
  10.  
  11.         echo 'Tag Archive for &quot;'; single_tag_title(); echo '&quot; | '; bloginfo( 'name' );
  12.  
  13.     } elseif ( is_archive() ) {
  14.  
  15.         wp_title(''); echo ' Archive | '; bloginfo( 'name' );
  16.  
  17.     } elseif ( is_search() ) {
  18.  
  19.         echo 'Search for &quot;'.wp_specialchars($s).'&quot; | '; bloginfo( 'name' );
  20.  
  21.     } elseif ( is_home() || is_front_page() ) {
  22.  
  23.         bloginfo( 'name' ); echo ' | '; bloginfo( 'description' );
  24.  
  25.     }  elseif ( is_404() ) {
  26.  
  27.         echo 'Error 404 Not Found | '; bloginfo( 'name' );
  28.  
  29.     } elseif ( is_single() ) {
  30.  
  31.         wp_title('');
  32.  
  33.     } else {
  34.  
  35.         echo wp_title( ' | ', false, right ); bloginfo( 'name' );
  36.  
  37.     } ?></title>
  38.  
  39.     <meta name="description" content="<?php wp_title(); echo ' | '; bloginfo( 'description' ); ?>" />
  40.  
  41.     <meta charset="<?php bloginfo( 'charset' ); ?>" />
  42.  
  43.     <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/p7ttm/p7TTMscripts.js"></script>
  44.  
  45.     <link rel="profile" href="http://gmpg.org/xfn/11" />
  46.  
  47.   <link rel="icon" href="<?php bloginfo( 'template_url' ); ?>/favicon.png" type="image/x-icon" />
  48.  
  49.     <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  50.  
  51.     <link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'rss2_url' ); ?>" />
  52.  
  53.     <link rel="alternate" type="application/atom+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'atom_url' ); ?>" />
  54.  
  55.     <!-- The HTML5 Shim is required for older browsers, mainly older versions IE -->
  56.  
  57.     <!--[if lt IE 9]>
  58.  
  59.         <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  60.  
  61.     <![endif]-->
  62.  
  63.   <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/normalize.css" />
  64.  
  65.     <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  66.  
  67.   <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/prettyPhoto.css" />
  68.  
  69.   <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/grid.css" />
  70.  
  71.   <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/p7ttm/p7TTM01.css" />
  72.  
  73.   <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/p7ttm/p7TTM04.css" />
  74.  
  75.   <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/p7ttm/p7TTM03.css" />
  76.  
  77.     <?php
  78.  
  79.         /* We add some JavaScript to pages with the comment form
  80.  
  81.          * to support sites with threaded comments (when in use).
  82.  
  83.          */
  84.  
  85.         if ( is_singular() && get_option( 'thread_comments' ) )
  86.  
  87.             wp_enqueue_script( 'comment-reply' );
  88.  
  89.    
  90.  
  91.         /* Always have wp_head() just before the closing </head>
  92.  
  93.          * tag of your theme, or you will break many plugins, which
  94.  
  95.          * generally use this hook to add elements to <head> such
  96.  
  97.          * as styles, scripts, and meta tags.
  98.  
  99.          */
  100.  
  101.         wp_head();
  102.  
  103.     ?>
  104.  
  105.   <!--[if lt IE 9]>
  106.  
  107.   <style type="text/css">
  108.  
  109.     a.link, a.more, div.link a, .wp-pagenavi a, .wp-pagenavi span, #commentform #submit, .reply a, div.link-1 a, #header-area-2 a, .map {
  110.  
  111.       behavior:url(<?php bloginfo('stylesheet_directory'); ?>/PIE.php)
  112.  
  113.       }
  114.  
  115.   </style>
  116.  
  117.   <![endif]-->
  118.  
  119.  
  120.  
  121.   <script type="text/javascript">
  122.  
  123.     // initialise plugins
  124.  
  125.         jQuery(function(){
  126.  
  127.             // main navigation init
  128.  
  129.             jQuery('ul.sf-menu').superfish({
  130.  
  131.                 delay:       <?php echo of_get_option('sf_delay'); ?>,      // one second delay on mouseout
  132.  
  133.                 animation:   {opacity:'<?php echo of_get_option('sf_f_animation'); ?>',height:'<?php echo of_get_option('sf_sl_animation'); ?>'}, // fade-in and slide-down animation
  134.  
  135.                 speed:       '<?php echo of_get_option('sf_speed'); ?>',  // faster animation speed
  136.  
  137.                 autoArrows:  <?php echo of_get_option('sf_arrows'); ?>,   // generation of arrow mark-up (for submenu)
  138.  
  139.                 dropShadows: <?php echo of_get_option('sf_shadows'); ?>   // drop shadows (for submenu)
  140.  
  141.             });
  142.  
  143.            
  144.  
  145.             // prettyphoto init
  146.  
  147.             jQuery("a[rel^='prettyPhoto']").prettyPhoto({
  148.  
  149.                 animation_speed:'normal',
  150.  
  151.                 slideshow:5000,
  152.  
  153.                 autoplay_slideshow: false
  154.  
  155.             });
  156.  
  157.            
  158.  
  159.         });
  160.  
  161.        
  162.  
  163.         // Init for audiojs
  164.  
  165.         audiojs.events.ready(function() {
  166.  
  167.             var as = audiojs.createAll();
  168.  
  169.         });
  170.  
  171.   </script>
  172.  
  173.  
  174.  
  175.   <script type="text/javascript">
  176.  
  177.         jQuery(window).load(function() {
  178.  
  179.             // nivoslider init
  180.  
  181.             jQuery('#slider').nivoSlider({
  182.  
  183.                 effect: '<?php echo of_get_option('sl_effect'); ?>',
  184.  
  185.                 slices:<?php echo of_get_option('sl_slices'); ?>,
  186.  
  187.                 boxCols:<?php echo of_get_option('sl_box_columns'); ?>,
  188.  
  189.                 boxRows:<?php echo of_get_option('sl_box_rows'); ?>,
  190.  
  191.                 animSpeed:<?php echo of_get_option('sl_animation_speed'); ?>,
  192.  
  193.                 pauseTime:<?php echo of_get_option('sl_pausetime'); ?>,
  194.  
  195.                 directionNav:<?php echo of_get_option('sl_dir_nav'); ?>,
  196.  
  197.                 directionNavHide:<?php echo of_get_option('sl_dir_nav_hide'); ?>,
  198.  
  199.                 controlNav:<?php echo of_get_option('sl_control_nav'); ?>,
  200.  
  201.                 captionOpacity:<?php $sl_caption_opacity = of_get_option('sl_caption_opacity'); if ($sl_caption_opacity != '') { echo of_get_option('sl_caption_opacity'); } else { echo '0'; } ?>
  202.  
  203.             });
  204.  
  205.         });
  206.  
  207.     </script>
  208.  
  209.   <!-- Custom CSS -->
  210.  
  211.     <?php if(of_get_option('custom_css') != ''){?>
  212.  
  213.   <style type="text/css">
  214.  
  215.     <?php echo of_get_option('custom_css' ) ?>
  216.  
  217.   </style>
  218.  
  219.   <?php }?>
  220.  
  221.  
  222.  
  223.   <style type="text/css">
  224.  
  225.         /* Body styling options */
  226.  
  227.         <?php $background = of_get_option('body_background');
  228.  
  229.             if ($background != '') {
  230.  
  231.                 if ($background['image'] != '') {
  232.  
  233.                     echo 'body { background-image:url('.$background['image']. '); background-repeat:'.$background['repeat'].'; background-position:'.$background['position'].';  background-attachment:'.$background['attachment'].'; }';
  234.  
  235.                 }
  236.  
  237.                 if($background['color'] != '') {
  238.  
  239.                     echo 'body { background-color:'.$background['color']. '}';
  240.  
  241.                 }
  242.  
  243.             };
  244.  
  245.         ?>
  246.  
  247.        
  248.  
  249.     /* Header styling options */
  250.  
  251.         <?php $header_styling = of_get_option('header_color');
  252.  
  253.             if($header_styling != '') {
  254.  
  255.                 echo '#header {background-color:'.$header_styling.'}';
  256.  
  257.             }
  258.  
  259.         ?>
  260.  
  261.        
  262.  
  263.         /* Links and buttons color */
  264.  
  265.         <?php $links_styling = of_get_option('links_color');
  266.  
  267.             if($links_styling) {
  268.  
  269.                 echo 'a{color:'.$links_styling.'}';
  270.  
  271.                 echo '.button {background:'.$links_styling.'}';
  272.  
  273.             }
  274.  
  275.         ?>
  276.  
  277.        
  278.  
  279.         /* Body typography */
  280.  
  281.         <?php $body_typography = of_get_option('body_typography');
  282.  
  283.             if($body_typography) {
  284.  
  285.                 echo 'body {font-family:'.$body_typography['face'].'; color:'.$body_typography['color'].'}';
  286.  
  287.                 echo '#main {font-size:'.$body_typography['size'].'; font-style:'.$body_typography['style'].';}';
  288.  
  289.             }
  290.  
  291.         ?>
  292.  
  293.   </style>
  294.  
  295. <meta name="google-translate-customization" content="2b8325eb5535aa47-a64f33425d4e26dc-ge303d21d5fa3c406-15"></meta>
  296.  
  297. </head>
  298.  
  299.  
  300.  
  301. <body <?php body_class(); ?>>
  302.  
  303.  
  304.  
  305. <div id="main"><!-- this encompasses the entire Web site -->
  306.  
  307.  
  308.  
  309.     <header id="header">
  310.  
  311.         <div class="container_12">
  312.  
  313.             <div class="grid_12">
  314.  
  315.          
  316.  
  317.             <div class="logo">
  318.  
  319.                     <?php if(of_get_option('logo_type') == 'text_logo'){?>
  320.  
  321.                         <?php if( is_front_page() || is_home() || is_404() ) { ?>
  322.  
  323.                      <h1><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h1>
  324.  
  325.                   <?php } else { ?>
  326.  
  327.                      <h2><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h2>
  328.  
  329.                   <?php } ?>
  330.  
  331.                     <?php } else { ?>
  332.  
  333.                   <?php if(of_get_option('logo_url') != ''){ ?>
  334.  
  335.                      <a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php echo of_get_option('logo_url', "" ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
  336.  
  337.                   <?php } else { ?>
  338.  
  339.                      <a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
  340.  
  341.                   <?php } ?>
  342.  
  343.                <?php }?>
  344.  
  345.                <p class="description"><?php bloginfo('description'); ?></p>
  346.  
  347.             </div>
  348.  
  349.        
  350.  
  351.             <nav class="primary">
  352.  
  353.                     <?php wp_nav_menu( array(
  354.  
  355.                         'container'       => 'ul',
  356.  
  357.                         'menu_class'      => 'sf-menu',
  358.  
  359.                         'menu_id'         => 'topnav',
  360.  
  361.                         'depth'           => 0,
  362.  
  363.                         'theme_location' => 'header_menu'
  364.  
  365.                  ));
  366.  
  367.                ?>
  368.  
  369.             </nav><!--.primary-->
  370.  
  371.        
  372.  
  373.                 <?php if ( of_get_option('g_search_box_id') == 'yes') { ?>  
  374.  
  375.                <form method="get" id="searchform" action="<?php echo get_option('home'); ?>/">
  376.  
  377.                   <input type="text" name="s">
  378.  
  379.                   <input type="submit" value="Search">
  380.  
  381.                </form>
  382.  
  383.             <?php } ?>
  384.  
  385.        
  386.  
  387.             <div id="header-area-1">
  388.  
  389.                     <?php if ( ! dynamic_sidebar( 'Header Area 1' ) ) : ?>
  390.  
  391.                   <!-- Widgetized Header -->
  392.  
  393.                <?php endif ?>
  394.  
  395.             </div><!--#widget-header-->
  396.  
  397.            
  398.  
  399.             <?php /*?><!--<div id="header-area-2">
  400.  
  401.                     <?php
  402.  
  403.                 if ( ! is_user_logged_in() )
  404.  
  405.                             $link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Client Login') . '</a>';
  406.  
  407.                         else
  408.  
  409.                             $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
  410.  
  411.                         echo apply_filters('loginout', $link);
  412.  
  413.                     ?>
  414.  
  415.             </div>--><?php */?>
  416.  
  417.        
  418.  
  419.          </div>
  420.  
  421.       </div><!--.container-->
  422.  
  423.    </header>
  424.  
  425.    
  426.  
  427.     <?php if( is_front_page() ) { ?>
  428.  
  429.       <section id="slider-wrapper">
  430.  
  431.          <div class="background">
  432.  
  433.             <div class="container_12">
  434.  
  435.                <div class="grid_12">
  436.  
  437.                         <?php include_once(TEMPLATEPATH . '/slider.php'); ?>
  438.  
  439.                </div>
  440.  
  441.             </div>
  442.  
  443.          </div>
  444.  
  445.       </section><!--#slider-->
  446.  
  447.    <?php } ?>
  448.  
  449.    
  450.  
  451.  
  452.  
  453.     <?php if( is_front_page() ) { ?>
  454.  
  455.       <div class="before-content-area">
  456.  
  457.          <div class="container">
  458.  
  459.             <div class="indent">
  460.  
  461.                <div class="wrapper">
  462.  
  463.                   <?php if ( ! dynamic_sidebar( 'Before Content Area' ) ) : ?>
  464.  
  465.                      <!--Widgetized 'Before Content Area' for the home page-->
  466.  
  467.                   <?php endif ?>
  468.  
  469.                </div>
  470.  
  471.             </div>
  472.  
  473.          </div>
  474.  
  475.       </div>
  476.  
  477.    <?php } ?>
  478.  
  479.  
  480.  
  481.     <div class="primary_content_wrap">
  482.  
  483.     <div class="container_12 clearfix">
  484.  
  485.         <div class="grid_12">
  486.  
  487.             <div class="wrapper">
  488.            
  489. <?php
  490.  
  491. $HEADER_IMAGE_WIDTH = 940;
  492. $HEADER_IMAGE_HEIGHT = 203;
  493.  
  494. // Check if this is a post or page, if it has a thumbnail, and if it's a big one<br />
  495. if ( is_singular() && has_post_thumbnail( $post->ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnails-header' ) ) && $image[1] >= $HEADER_IMAGE_WIDTH ) :
  496.  
  497. //new header image<br />
  498. echo get_the_post_thumbnail( $post->ID, 'post-thumbnails-header' );
  499. else : ?>
  500. <img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" width="<?php echo $HEADER_IMAGE_WIDTH; ?>" height="<?php echo $HEADER_IMAGE_HEIGHT; ?>" alt="" />
  501.  
  502. <?php endif; ?>
  503.  
  504.                 <div class="indent">
  505.  
  506.                 <div class="wrapper-1">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement