Advertisement
adsleeblythe

header.php with is_home()

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