Skip to content

Instantly share code, notes, and snippets.

@FranciscoHV
Last active October 19, 2016 12:46
Show Gist options
  • Save FranciscoHV/ccfefca2446d0f6c4b9a323b8c1f8672 to your computer and use it in GitHub Desktop.
Save FranciscoHV/ccfefca2446d0f6c4b9a323b8c1f8672 to your computer and use it in GitHub Desktop.
Header MC Wordpress
<?php
//Header File
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<title>
<?php echo wp_title('|',true,'right'); ?>
</title>
<?php
$layout = vibe_get_option('layout');
if(!isset($layout) || !$layout)
$layout = '';
wp_head();
?>
</head>
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '941513122632852');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=941513122632852&ev=PageView&noscript=1"
/></noscript>
<script type="text/javascript">
(function(e, t) {
function r(e, t) {
e[t] = function() {
e.push([ t ].concat(Array.prototype.slice.call(arguments, 0)));
};
}
var n = "JacoRecorder";
(function(e, t, i, s) {
if (!i.__VERSION) {
e[n] = i;
var o = [ "init", "identify", "startRecording", "stopRecording", "removeUserTracking", "setUserInfo" ];
for (var u = 0; u < o.length; u++) r(i, o[u]);
i.__VERSION = 2, i.__INIT_TIME = 1 * new Date;
var a = t.createElement("script");
a.async = !0, a.setAttribute("crossorigin", "anonymous"), a.src = s;
var f = t.getElementsByTagName("head")[0];
f.appendChild(a);
}
})(e, t, e[n] || [], "//recorder-assets.getjaco.com/recorder_v2.js");
}).call(window, window, document), window.JacoRecorder.push([ "init", "11a9512f-df9c-4c62-97a4-f3c87b9e082b", {} ]);
</script>
<body <?php body_class($layout); ?>>
<div id="global" class="global">
<div class="pagesidebar">
<div class="sidebarcontent">
<h2 id="sidelogo">
<a href="<?php echo vibe_site_url(); ?>"><img src="<?php echo apply_filters('wplms_logo_url',VIBE_URL.'/images/logo.png'); ?>" alt="<?php echo get_bloginfo('name'); ?>" /></a>
</h2>
<?php
$args = apply_filters('wplms-mobile-menu',array(
'theme_location' => 'mobile-menu',
'container' => '',
'menu_class' => 'sidemenu',
'fallback_cb' => 'vibe_set_menu',
));
wp_nav_menu( $args );
?>
</div>
<a class="sidebarclose"><span></span></a>
</div>
<div class="pusher">
<?php
$fix=vibe_get_option('header_fix');
?>
<div id="headertop" class="<?php if(isset($fix) && $fix){echo 'fix';} ?>">
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-3">
<a href="<?php echo vibe_site_url(); ?>" class="homeicon"><img src="<?php echo apply_filters('wplms_logo_url',VIBE_URL.'/images/logo.png'); ?>" alt="<?php echo get_bloginfo('name'); ?>" /></a>
</div>
<div class="col-md-8 col-sm-9">
<?php
if ( function_exists('bp_loggedin_user_link') && is_user_logged_in() ) :
?>
<ul class="topmenu">
<li><a href="<?php bp_loggedin_user_link(); ?>" class="smallimg vbplogin"><?php $n=vbp_current_user_notification_count(); echo ((isset($n) && $n)?'<em></em>':''); bp_loggedin_user_avatar( 'type=full' ); ?><?php bp_loggedin_user_fullname(); ?></a></li>
<?php do_action('wplms_header_top_login'); ?>
</ul>
<?php
else :
?>
<ul class="topmenu">
<li><a href="#login" class="smallimg vbplogin"><?php _e('Login','vibe'); ?></a></li>
<li><?php if ( function_exists('bp_get_signup_allowed') && bp_get_signup_allowed() ) :
$registration_link = apply_filters('wplms_buddypress_registration_link',site_url( BP_REGISTER_SLUG . '/' ));
printf( __( '<a href="%s" class="vbpregister btregister" title="'.__('Create an account','vibe').'">'.__('Sign Up','vibe').'</a> ', 'vibe' ), $registration_link );
endif; ?>
</li>
</ul>
<?php
endif;
$args = apply_filters('wplms-top-menu',array(
'theme_location' => 'top-menu',
'container' => '',
'menu_class' => 'topmenu',
'fallback_cb' => 'vibe_set_menu',
));
wp_nav_menu( $args );
?>
</div>
<div id="vibe_bp_login">
<?php
if ( function_exists('bp_get_signup_allowed')){
the_widget('vibe_bp_login',array(),array());
}
?>
</div>
</div>
</div>
</div>
<header>
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-3 col-xs-12">
<?php
if(is_home()){
echo '<h1 id="logo">';
}else{
echo '<h2 id="logo">';
}
?>
<a href="<?php echo vibe_site_url(); ?>"><img src="<?php echo apply_filters('wplms_logo_url',VIBE_URL.'/images/logo.png'); ?>" alt="<?php echo get_bloginfo('name'); ?>" /></a>
<?php
if(is_home()){
echo '</h1>';
}else{
echo '</h2>';
}
?>
</div>
<div class="col-md-9 col-sm-9">
<div id="searchicon"><i class="icon-search-2"></i></div>
<div id="searchdiv">
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Hit enter to search...','vibe'); ?>" />
<?php
$course_search=vibe_get_option('course_search');
if(isset($course_search) && $course_search)
echo '<input type="hidden" value="course" name="post_type" />';
?>
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
</div>
<?php
$args = apply_filters('wplms-main-menu',array(
'theme_location' => 'main-menu',
'container' => 'nav',
'menu_class' => 'menu',
'walker' => new vibe_walker,
'fallback_cb' => 'vibe_set_menu'
));
wp_nav_menu( $args );
?>
</div>
<a id="trigger">
<span class="lines"></span>
</a>
</div>
</div>
</header>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment