File: /volume1/web/wordpress/wp-content/themes/pitra/header.php
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package pitra
*/
?>
<!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="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'pitra' ); ?></a>
<header id="masthead" class="site-header">
<div class="container-fluid">
<div class="site-branding">
<div class="row">
<div class="col-md-3 col-xs-12 site-logo text-center">
<?php
if (!has_custom_logo()) {
?>
<?php
if ( is_front_page() && is_home() ) :
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php
else :
?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
$pitra_description = get_bloginfo( 'description', 'display' );
if ( $pitra_description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $pitra_description; /* WPCS: xss ok. */ ?></p>
<?php endif; ?>
<?php
}else{
the_custom_logo();
}
?>
</div><!-- .site-logo -->
<div class="socials text-center">
<?php if(get_theme_mod('pitra_facebook')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_facebook')); ?>" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_twitter')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_twitter')); ?>" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_instagram')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_instagram')); ?>" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_bloglovin')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_bloglovin')); ?>" target="_blank"><i class="fa fa-heart" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_google')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_google')); ?>" target="_blank"><i class="fa fa-google-plus" aria-hidden="true"></i></span></a><?php endif; ?>
<?php if(get_theme_mod('pitra_youtube')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_youtube')); ?>" target="_blank"><i class="fa fa-youtube" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_dribbble')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_dribbble')); ?>" target="_blank"><i class="fa fa-futbol-o" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_linkedin')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_linkedin')); ?>" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_soundcloud')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_soundcloud')); ?>" target="_blank"><i class="fa fa-soundcloud" aria-hidden="true"></i></a><?php endif; ?>
<?php if(get_theme_mod('pitra_vimeo')) : ?><a href="<?php echo esc_url(get_theme_mod('pitra_vimeo')); ?>" target="_blank"><i class="fa fa-vimeo" aria-hidden="true"></i></a><?php endif; ?>
</div><!-- .socials -->
</div>
</div><!-- .site-branding -->
</div><!-- .container-fluid-->
<div class="my-menu">
<nav id="site-navigation" class="main-navigation">
<div class="menu-style col-md-12">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><span class="dashicons dashicons-menu"></span></button>
</div>
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
) );
?>
</nav><!-- #site-navigation -->
</div> <!-- .my-menu -->
<div class="header-image-class">
<?php if( is_front_page() || is_home() ) : if( has_custom_header() ) : ?>
<div class="header-top-image">
<?php if ( has_header_image() ) { ?>
<img class="the-image" src="<?php echo( get_header_image() ); ?>">
<?php } ?>
</div><!-- header-top-image -->
<div class="header-center-button">
<?php if (get_theme_mod('button_text') ) : ?>
<a class="center-button" href="<?php if (get_theme_mod('button_text') ) : ?><?php echo esc_url(get_theme_mod('button_link')) ?><?php endif; ?>">
<?php if (get_theme_mod('button_text') ) : ?><?php echo esc_html(get_theme_mod('button_text')) ?>
<?php endif; ?>
</a>
<?php endif; ?>
</div> <!-- .header-center-button -->
<?php endif; endif; ?>
</div><!-- .header-image-class -->
</header><!-- #masthead -->
<div id="content" class="site-content">