-
-
Save anonymous/ff5c965eb56957979e1d495b0a529d9b to your computer and use it in GitHub Desktop.
Header from Perth Pro for deactivating Video Loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The header for our theme. | |
* | |
* Displays all of the <head> section and everything up till <div id="content"> | |
* | |
* @package Perth | |
*/ | |
?><!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="profile" href="http://gmpg.org/xfn/11"> | |
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> | |
<?php if ( get_theme_mod('site_favicon') ) : ?> | |
<link rel="shortcut icon" href="<?php echo esc_url(get_theme_mod('site_favicon')); ?>" /> | |
<?php endif; ?> | |
<?php wp_head(); ?> | |
</head> | |
<body <?php body_class(); ?>> | |
<div class="preloader"> | |
<div class="preload-inner"> | |
<div class="box1 preloader-box"></div> | |
<div class="box2 preloader-box"></div> | |
<div class="box3 preloader-box"></div> | |
<div class="box4 preloader-box"></div> | |
</div> | |
</div> | |
<div id="page" class="hfeed site"> | |
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'perth' ); ?></a> | |
<header id="masthead" class="site-header clearfix" role="banner"> | |
<div class="container"> | |
<?php if ( display_header_text() ) : ?> | |
<div class="site-branding col-md-4 col-sm-6 col-xs-12"> | |
<?php perth_branding(); ?> | |
</div> | |
<?php endif; ?> | |
<nav id="site-navigation" class="main-navigation col-md-8" role="navigation"> | |
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?> | |
</nav><!-- #site-navigation --> | |
<nav class="mobile-nav"></nav> | |
</div> | |
</header><!-- #masthead --> | |
<div class="header-clone"></div> | |
<?php perth_contact_info(); ?> | |
<?php //Header type | |
$front_header = get_theme_mod('front_header_type' ,'image'); | |
$site_header = get_theme_mod('site_header_type', 'image'); | |
?> | |
<?php if ( get_header_image() && ( $front_header == 'image' && is_front_page() || $site_header == 'image' && !is_front_page() ) ) : ?> | |
<div class="header-image"> | |
<div class="header-overlay"></div> | |
<?php perth_header_text(); ?> | |
</div> | |
<?php elseif ( ($front_header == 'crelly' && is_front_page()) || ($site_header == 'crelly' && !is_front_page()) ) : ?> | |
<?php | |
$alias = get_theme_mod('rev_alias'); | |
if ($alias && function_exists('crellySlider')) { | |
crellySlider($alias); | |
} | |
?> | |
<?php elseif ( ($front_header == 'video' && is_front_page()) || ($site_header == 'video' && !is_front_page()) ) : ?> | |
<?php | |
$mp4 = get_theme_mod('video_mp4'); | |
$webm = get_theme_mod('video_webm'); | |
$ogv = get_theme_mod('video_ogv'); | |
$poster = get_theme_mod('video_poster'); | |
?> | |
<div class="video-container"> | |
<?php echo do_shortcode('[video autoplay="on" poster="' . esc_url($poster) . '" loop="off" mp4="' . esc_url($mp4) . '" webm="' . esc_url($webm) . '" ogv="' . esc_url($ogv) . '"]'); ?> | |
</div> | |
<?php endif; ?> | |
<?php if ( is_active_sidebar( 'sidebar-header' ) && get_theme_mod('activate_bh_widgets') && (!is_front_page() || ( is_front_page() && get_theme_mod('hide_bh_widgets') != 1 ) ) ) : ?> | |
<div id="header-widgets" class="header-widgets"> | |
<div class="container"> | |
<?php dynamic_sidebar( 'sidebar-header' ); ?> | |
</div> | |
</div> | |
<?php endif; ?> | |
<div id="content" class="site-content"> | |
<div id="content-wrapper" class="container"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment