Skip to content

Instantly share code, notes, and snippets.

@Longkt
Created September 11, 2018 06:37
Show Gist options
  • Save Longkt/9ace47faea404361df7d1113548f943a to your computer and use it in GitHub Desktop.
Save Longkt/9ace47faea404361df7d1113548f943a to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="kopa-page-header">
<div id="kopa-header-top-menu" style="background: #006db6;">
<div class="container">
<div class="row">
<div class="col-xs-12">
<nav id="top-nav" class="pull-left clearfix">
<?php
if ( has_nav_menu('top-nav') ) {
#TOP MENU
$top_nav_args = array(
'theme_location' => 'top-nav',
'container' => '',
'container_id' => '',
'container_class' => '',
'menu_id' => 'top-menu',
'menu_class' => 'clearfix',
'walker' => new Upside_Walker_Icon_Menu()
);
wp_nav_menu( $top_nav_args );
#TOP MENU MOBILE
$top_nav_mobile_args = array(
'theme_location' => 'top-nav',
'container' => '',
'container_id' => '',
'container_class' => '',
'menu_id' => 'top-menu-mobile',
'menu_class' => 'top-main-menu-mobile clearfix'
);
echo '<nav class="top-main-nav-mobile clearfix">';
echo '<a class="pull"><span class="fa fa-align-justify"></span></a>';
wp_nav_menu( $top_nav_mobile_args );
echo '</nav>';
}
$upside_search_e = get_theme_mod('header-enable-search', '1');
if ( 1 == $upside_search_e ) :
?>
<div class="kopa-search-box">
<a href="#" class="toggle-search-box"><i class="fa fa-search"></i><span><?php esc_html_e('search', 'upside'); ?></span></a>
<form method="get" class="search-form clearfix" action="<?php echo esc_url(home_url('/')); ?>">
<input type="text" class="search-text" name="s" placeholder="<?php esc_attr_e('Search...', 'upside'); ?>">
<button type="submit" class="search-submit"><i class="fa fa-search"></i></button>
</form>
</div>
<?php endif; ?>
</nav>
<!-- top-nav -->
</div>
<!-- col-md-6 -->
</div>
</div>
</div>
<div id="kopa-header-top">
<div class="container">
<div class="row">
<div class="col-xs-12">
<?php
$upside_logo = get_theme_mod('logo', '');
$upside_logo = apply_filters('upside_custom_logo', $upside_logo);
?>
<div id="logo-image" class="pull-left">
<?php if ( $upside_logo ) : ?>
<a href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>">
<img src="<?php echo esc_url($upside_logo); ?>" alt="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>">
</a>
<?php else: ?>
<?php
if ( is_home() || is_front_page() ) {
echo '<h1 class="site-title">';
} else {
echo '<div class="site-title">';
}
?>
<a href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr(get_bloginfo('name'));?>"><?php echo esc_attr(get_bloginfo('name'), 'display');?></a>
<?php
if ( is_home() || is_front_page() ) {
echo '</h1>';
} else {
echo '</div>';
}
?>
<p><?php echo esc_attr(get_bloginfo('description', 'display')); ?></p>
<?php endif; ?>
</div>
</div>
<!-- col-md-3 -->
</div>
<!-- row -->
</div>
<!-- container -->
</div>
<!-- kopa-header-top -->
<div id="kopa-header-bottom">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-sx-12">
<?php if ( has_nav_menu('main-nav') || has_nav_menu('mobile-nav') ) : ?>
<nav id="main-nav">
<?php
#MAIN MENU
if ( has_nav_menu('main-nav') ) {
$main_nav_args = array(
'theme_location' => 'main-nav',
'container' => '',
'container_id' => '',
'container_class' => 'main-nav',
'menu_id' => 'main-menu',
'menu_class' => 'clearfix'
);
if ( class_exists('Upside_Walker_Main_Menu') ) {
$main_nav_args['walker'] = new Upside_Walker_Main_Menu();
}
wp_nav_menu( $main_nav_args );
}
#MOBILE MENU
if ( has_nav_menu('mobile-nav') ) : ?>
<nav class="main-nav-mobile clearfix">
<a class="pull"><?php esc_html_e('Main Menu', 'upside'); ?></a>
<?php
$mobile_nav_args = array(
'theme_location' => 'mobile-nav',
'container' => '',
'container_id' => '',
'container_class' => 'main-nav',
'menu_id' => 'mobile-menu',
'menu_class' => 'main-menu-mobile clearfix"'
);
wp_nav_menu( $mobile_nav_args );
?>
</nav>
<?php endif;?>
</nav>
<!-- main-nav -->
<?php endif;?>
<div class="mobile-search-box pull-right clearfix">
<form action="<?php echo esc_url(trailingslashit(home_url('/'))); ?>" class="mobile-search-form clearfix" id="mobile-search-form" method="get">
<input type="text" onBlur="if (this.value == '')
this.value = this.defaultValue;" onFocus="if (this.value == this.defaultValue)
this.value = '';" value="<?php esc_attr_e('Search Site...', 'upside'); ?>" name="s" class="search-text">
<button type="submit" class="search-submit"><i class="fa fa-search"></i></button>
</form><!-- mobile-search-form -->
</div><!--end:mobile-search-box-->
</div>
<!-- col-md-12 -->
</div>
<!-- row -->
</div>
<!-- container -->
</div>
<!-- kopa-header-bottom -->
</div>
<!-- kopa-page-header -->
<div id="main-content">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment