Advertisement
Guest User

header.php

a guest
Aug 28th, 2016
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.71 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package Gather - Event Landing Page Wordpress Theme
  4.  * @author Cththemes - http://themeforest.net/user/cththemes
  5.  * @date: 10-8-2015
  6.  *
  7.  * @copyright  Copyright ( C ) 2014 - 2015 cththemes.com . All rights reserved.
  8.  * @license    GNU General Public License version 2 or later; see LICENSE
  9.  */
  10. ?>
  11. <!DOCTYPE HTML>
  12. <?php
  13.     global $cththemes_options;
  14.     global $wp_query;
  15.  
  16.     $seo_title = get_post_meta($wp_query->get_queried_object_id(), "_cmb_seo_title", true);
  17.     $seo_description = get_post_meta($wp_query->get_queried_object_id(), "_cmb_seo_description", true);
  18.     $seo_keywords = get_post_meta($wp_query->get_queried_object_id(), "_cmb_seo_keywords", true);
  19.     $navigation_type = get_post_meta($wp_query->get_queried_object_id(), "_cmb_navigation_type", true);
  20.     if(!$navigation_type){
  21.         $navigation_type = $cththemes_options['navigation_type'];
  22.     }
  23. ?>
  24. <html <?php language_attributes(); ?>>
  25.     <head>
  26.         <meta charset="<?php bloginfo( 'charset' ); ?>"/>
  27.         <link rel="profile" href="http://gmpg.org/xfn/11" />
  28.         <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  29.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  30.         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  31.         <!-- For SEO -->
  32.         <?php if($seo_description!="") { ?>
  33.         <meta name="description" content="<?php echo esc_attr($seo_description ); ?>">
  34.         <?php }elseif($cththemes_options['seo_des']){ ?>
  35.         <meta name="description" content="<?php echo esc_attr($cththemes_options['seo_des']); ?>">
  36.         <?php } ?>
  37.         <?php if($seo_keywords!="") { ?>
  38.         <meta name="keywords" content="<?php echo esc_attr($seo_keywords); ?>">
  39.         <?php }elseif($cththemes_options['seo_key']){ ?>
  40.         <meta name="keywords" content="<?php echo esc_attr($cththemes_options['seo_key']); ?>">
  41.         <?php } ?>
  42.         <?php if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) { ?>
  43.         <!-- Favicon -->        
  44.         <link rel="shortcut icon" href="<?php echo esc_url($cththemes_options['favicon']['url']);?>" type="image/x-icon"/>
  45.         <?php } ?>
  46.        
  47.         <?php    
  48.    
  49.         wp_head(); ?>
  50.        
  51.     </head>
  52.  
  53.     <body <?php body_class( !$cththemes_options['disable_animation']? 'animate-page' : '' );?> data-spy="scroll" data-target="#navbar" data-offset="100">
  54.         <?php if($cththemes_options['show_loader']):?>
  55.         <div class="preloader"></div>  
  56.         <?php endif;?>
  57.  
  58.         <!-- Fixed navbar -->
  59.     <nav class="navbar navbar-default<?php echo ($navigation_type == 'reveal')? ' navbar-fixed-top reveal-menu js-reveal-menu reveal-menu-hidden' : (($navigation_type == 'sticky')? ' navbar-fixed-top' :'');?>">
  60.         <div class="container">
  61.             <div class="navbar-header">
  62.                 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  63.                     <span class="sr-only"><?php _e('Toggle navigation','gather');?></span>
  64.                     <span class="icon-bar"></span>
  65.                     <span class="icon-bar"></span>
  66.                     <span class="icon-bar"></span>
  67.                 </button>
  68.                 <a class="navbar-brand" href="<?php echo esc_url(home_url('/'));?>">
  69.                 <?php if($cththemes_options['logo']['url']):?>
  70.                     <img src="<?php echo esc_url($cththemes_options['logo']['url']);?>" width="<?php echo esc_attr($cththemes_options['logo_size_width'] );?>" height="<?php echo esc_attr($cththemes_options['logo_size_height'] );?>" class="responsive-img logo-vis" alt="<?php bloginfo('name');?>" />
  71.                 <?php endif;?>
  72.                 <?php if($cththemes_options['logo_text']):?>
  73.                     <h1 class="logo_text"><?php echo esc_html($cththemes_options['logo_text']);?></h1>
  74.                 <?php endif;?>
  75.                 <?php if($cththemes_options['slogan']):?>
  76.                     <h3 class="slogan"><em><?php echo esc_html($cththemes_options['slogan']);?></em></h3>
  77.                 <?php endif;?>
  78.                 </a>
  79.             </div>
  80.             <div id="navbar" class="navbar-collapse collapse">
  81.             <?php
  82.                 $defaults1= array(
  83.                     'theme_location'  => 'primary',
  84.                     'menu'            => '',
  85.                     'container'       => '',
  86.                     'container_class' => '',
  87.                     'container_id'    => '',
  88.                     'menu_class'      => 'gather_main-nav nav navbar-nav navbar-right',
  89.                     'menu_id'         => '',
  90.                     'echo'            => true,
  91.                     // 'fallback_cb'     => 'wp_page_menu ',
  92.                     // 'walker'          => new Walker_Nav_Menu(),
  93.                     'fallback_cb'     => 'wp_bootstrap_navwalker::fallback',
  94.                     'walker'          => new wp_bootstrap_navwalker(),
  95.                     'before'          => '',
  96.                     'after'           => '',
  97.                     'link_before'     => '',
  98.                     'link_after'      => '',
  99.                     'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
  100.                     'depth'           => 0,
  101.                 );
  102.                
  103.                 if ( has_nav_menu( 'primary' ) ) {
  104.                     wp_nav_menu( $defaults1 );
  105.                 }
  106.             ?>
  107.             <?php
  108.             if(is_active_sidebar('top_social_widget')){
  109.                 dynamic_sidebar('top_social_widget');
  110.             }
  111.             ?>
  112.             </div>
  113.             <!--/.nav-collapse -->
  114.         </div>
  115.     </nav><!-- // End Fixed navbar -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement