Current Path : /var/www/ya/wp-content/themes/youthy/ |
Current File : /var/www/ya/wp-content/themes/youthy/header.php |
<!doctype html> <html class="no-js" <?php language_attributes(); ?>> <head> <!-- <title>Gallery</title> --> <!-- Just Added this to replace service text in title --> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"> <?php // Set up body classes, don't move this code out or the is_single() etc. won't work. $body_class = ""; // Get Theme options for sidebars $sidebar_switch = get_theme_mod( 'sidebar_switch' , '' ); $hide_sidebar = get_theme_mod( 'hide_sidebar' , '1' ); // All sidebars $hide_sidebar_page = get_theme_mod( 'hide_sidebar_page' , '' ); // Page Sidebar $hide_sidebar_post = get_theme_mod( 'hide_sidebar_post' , '' ); // Post Sidebar $hide_sidebar_service = get_theme_mod( 'hide_sidebar_service' , '' ); // Service Sidebar $hide_sidebar_team = get_theme_mod( 'hide_sidebar_team' , '' ); // Team Sidebar // Never show the sidebar on the homepage template if( !is_page_template( 't-homepage.php' ) ) { // Never show a sidebar if all sidebars are off if( $hide_sidebar !== '1' ) { // If single and theme options allow, show sidebar if ( is_singular('post') && !$hide_sidebar_post ) { $body_class = $body_class . ' sidebar-on'; } // If page and not a specific template and theme options allow, show sidebar if ( !is_page_template( 't-service.php' ) && !is_page_template( 't-book.php' ) && !is_page_template( 't-team.php' ) ) { if ( is_page() && !$hide_sidebar_page ) { $body_class = $body_class . ' sidebar-on'; } } // If singlular service or service template and theme options allow, show sidebar if ( ( is_singular('service') || is_page_template( 't-service.php' ) ) && !$hide_sidebar_service ) { $body_class = $body_class . ' sidebar-on'; } // If singlular team or team template and theme options allow, show sidebar if ( ( is_singular('team') || is_page_template( 't-team.php' ) ) && !$hide_sidebar_team ) { $body_class = $body_class . ' sidebar-on'; } } //END if( $hide_sidebar ) } // END if not homepage template // WooCommerce sidebar if ( class_exists( 'WooCommerce' ) ) { if( get_theme_mod( 'show_sidebar_woocommerce' ) !== '1' ) { if ( is_woocommerce() ) { $body_class = ""; } } if( get_theme_mod( 'show_sidebar_woocommerce' ) === '1' ) { if ( is_woocommerce() && !is_shop() && !is_product_category() ) { $body_class = $body_class . ' sidebar-on'; } } } // Sidebar switch and sticky menu if ( $sidebar_switch ) { $body_class = 'sidebar-switch'; } ?> <?php wp_head(); ?> </head> <body <?php body_class( $body_class ); ?> id="top"> <div id="main-wrap"> <div class="header-wrap"> <?php // If contact header not hidden show it if( get_theme_mod( 'hide_contact_header' , '' ) !== '1' ) { ?> <div class="contact-header"> <?php if( !get_theme_mod( 'content_contact_tel' ) && !get_theme_mod( 'content_contact_email' ) ) { ?> Don't forget to add your contact information via Customize > Header Settings <?php } ?> <?php if( get_theme_mod( 'content_contact_tel' ) || get_theme_mod( 'content_contact_email' ) ) { ?> <div class="contacts"> <?php } ?> <?php if( get_theme_mod( 'content_contact_tel' ) ) { ?> <div class="contact-tel"> <i class="fa fa-phone"></i> <?php echo esc_html( get_theme_mod( 'content_contact_tel' ) ); ?> </div> <?php } ?> <?php if( get_theme_mod( 'content_contact_email' ) ) { ?> <span class="contact-email"> <i class="fa fa-envelope"></i> <a href="mailto:<?php echo esc_html( get_theme_mod( 'content_contact_email' ) ); ?>"><?php echo esc_html( get_theme_mod( 'content_contact_email' ) ); ?></a> </span> <?php } ?> <?php if( get_theme_mod( 'content_contact_tel' ) || get_theme_mod( 'content_contact_email' ) ) { ?> </div> <?php } ?> <?php if ( is_active_sidebar('social-header-widgets') ) { ?> <div class="contact-social"> <?php // Just meant for the MeanThemes Social Widget if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('social-header-widgets')) { } ?> </div> <?php } ?> </div> <?php } ?> <header class="header"> <div class="site-logo<?php if( get_theme_mod( 'hide_logo_text' , '' ) !== '1' ) { echo ' plain'; } ?>"> <div class="site-logo-inner"> <?php // Get a logo if there is one from theme options $logo = get_theme_mod( 'meanthemes_logo_image' ); $logo_retina = get_theme_mod( 'meanthemes_logo_image_retina' ); if ( $logo ) { ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_html( get_theme_mod( 'text_logo_title' , 'Go to Home' ) ); ?>"><img class="main-logo retina" src="<?php echo esc_url( $logo ); ?>" alt="<?php echo esc_html( get_theme_mod( 'text_logo_alt' , 'Logo' ) ); ?>" <?php if ($logo_retina) { echo ' data-fullsrc="' . esc_url( $logo_retina ) . '"'; } ?> /></a> <?php } // end if ?> <?php // Hide the site title based on theme options if( get_theme_mod( 'hide_logo_text' ) !== '1' ) { ?> <div class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php esc_html( _e('Go to Home', 'meanthemes') ); ?>"> <?php // Check theme options to push logo text or logo image in ?> <?php bloginfo('name'); ?> </a></div> <?php } // Plain text logo ?> <?php // Check theme options for whether to show tagline if( get_theme_mod( 'hide_tagline' , '' ) !== '1' ) { ?> <div class="site-tagline"><?php bloginfo('description'); ?></div> <?php } ?> </div><!-- /logo-inner --> <?php if ( class_exists( 'WooCommerce' ) ) { if ( get_theme_mod( 'show_woocommerce_cart_total' , '1' ) === "1" ) { ?> <a class="cart-cta" href="<?php echo WC()->cart->get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' , 'meanthemes' ); ?>"><i class="fa fa-shopping-cart"></i> <span class="cart-details"><?php echo sprintf (_n( '%d ', '%d ', WC()->cart->cart_contents_count ), WC()->cart->cart_contents_count ); ?> - <?php echo WC()->cart->get_cart_total(); ?></span></a> <?php } } ?> </div><!-- /logo --> <?php // Hide main menu based on theme options if ( !get_theme_mod( 'hide_menu' , '0' ) ) { ?> <nav id="nav" role="navigation"> <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_id' => false, 'menu_class' => false ) ); ?> </nav> <?php } // Hide main menu ?> </header> </div> <div class="content-wrap"> <?php // Decide whethere it is an archive page... $main_class = ''; if ( !is_page() && !is_single() && !is_404() ) { $main_class = ' main-archive'; } // If WooCommerce is running, turn the class off if ( class_exists( 'WooCommerce' ) ) { if ( is_woocommerce() ) { $main_class = ''; } } ?> <section class="main<?php echo esc_html( $main_class ); ?>">