Guest User

Zalive header.php (template)

a guest
Mar 1st, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.61 KB | None | 0 0
  1. <?php
  2. /**
  3.  * common header template
  4.  */
  5.  global $zAlive_options;
  6. ?><!DOCTYPE html>
  7. <!--[if IE 8]>
  8. <html class="ie ie8" <?php language_attributes(); ?>>
  9. <![endif]-->
  10. <!--[if !(IE 8)  ]><!-->
  11. <html <?php language_attributes(); ?>>
  12. <!--<![endif]-->
  13. <head>
  14. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  15. <title><?php wp_title( '|', true, 'right' ); ?></title>
  16. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  17. <link rel="profile" href="http://gmpg.org/xfn/11" />
  18. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  19. <?php wp_head(); ?>
  20. </head>
  21. <body <?php body_class( ( is_home() && $zAlive_options['hide_posts_and_primary_sidebar'] == true ) ? 'hide_posts_and_primary_sidebar' : '' ); ?>>
  22.   <div id="header">
  23.     <div class="navbar container">
  24.       <div class="navbar-inner">
  25.         <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
  26.                 <<?php echo $heading_tag; ?> class="brand">
  27.           <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
  28.         </<?php echo $heading_tag; ?>>
  29.         <ul class="nav">
  30.           <?php
  31.             if ( has_nav_menu( 'top_nav_menu' ) ) {
  32.               wp_nav_menu( array('theme_location'  => 'top_nav_menu', 'container' => '','depth' => 3 ,'items_wrap' => '%3$s' ) );
  33.             } else {
  34.               wp_list_categories('depth=3&title_li=0&orderby=id&show_count=0&number=6');
  35.             }          
  36.           ?>
  37.         </ul>
  38.       <?php if( $zAlive_options['header_searchbox_enabled'] == true ) : ?>
  39.         <form class="pull-right input-append" id="searchbox" method="get" action="<?php echo esc_url( home_url() ); ?>/">
  40.           <input name="s" id="s" type="text" placeholder="<?php _e('Type and search...','zAlive'); ?>">
  41.           <button type="submit" class="btn"><?php _e('Search','zAlive'); ?></button>
  42.         </form>
  43.       <?php endif; ?>
  44.       </div>
  45.     </div>
  46.   <?php if( $zAlive_options['show_tagline_directly'] == true ) : ?>
  47.     <div id="site-description" class="tagline tagline-shown-directly container visible-desktop">
  48.       <p><?php bloginfo('description'); ?></p>
  49.     </div>
  50.   <?php else : ?>
  51.     <div id="site-description" class="tagline tagline-hidden container visible-desktop">
  52.       <p><?php bloginfo('description'); ?></p>
  53.     </div>
  54.   <?php endif; ?>
  55.   </div>
  56.   <?php //slider
  57.     if( $zAlive_options['slider_enabled'] == 1 || ( $zAlive_options['slider_enabled'] == 2 && ( is_home() || is_front_page() ) ) ){
  58.       get_template_part( 'template/slider' );
  59.     }
  60.   ?>
Add Comment
Please, Sign In to add comment