Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The Header for our theme.
- *
- * Displays all of the <head> section and everything up till <div id="main">
- *
- * @package b4b
- */
- ?><!DOCTYPE html>
- <html <?php language_attributes(); ?>>
- <head>
- <meta charset="<?php bloginfo( 'charset' ); ?>" />
- <meta name="viewport" content="width=device-width" />
- <title><?php wp_title( '|', true, 'right' ); ?></title>
- <link rel="profile" href="http://gmpg.org/xfn/11" />
- <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
- <?php wp_head(); ?>
- </head>
- <body <?php body_class(); ?>>
- <div id="page" class="hfeed site">
- <?php do_action( 'before' ); ?>
- <header id="masthead" class="site-header" role="banner">
- <?php $display_options = get_option( 'b4b_theme_display_options' ); ?>
- <div class="site-branding">
- <?php if (sanitize_text_field($display_options['header_type']) == 'image'){ ?>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
- <img src="<?php echo esc_url($display_options['header_image']); ?>" alt="logo" />
- </a>
- <?php } elseif(sanitize_text_field($display_options['header_type']) == 'text' && sanitize_title($display_options['header_title']) == '' && sanitize_text_field($display_options['header_slogan']) == '') { ?>
- <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
- <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
- <?php } elseif(sanitize_text_field($display_options['header_type']) == 'text' && sanitize_title($display_options['header_title']) != '' && sanitize_text_field($display_options['header_slogan']) != '') { ?>
- <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( sanitize_title($display_options['header_title']) ); ?>" rel="home"><?php echo esc_attr( sanitize_title($display_options['header_title']) ); ?></a></h1>
- <h2 class="site-description"><?php echo esc_attr( sanitize_text_field($display_options['header_slogan']) ); ?></h2>
- <?php } ?>
- </div>
- <nav id="site-navigation" class="navigation-main" role="navigation">
- <h1 class="menu-toggle"><?php _e( 'Menu', 'b4b' ); ?></h1>
- <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'b4b' ); ?>"><?php _e( 'Skip to content', 'b4b' ); ?></a></div>
- <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
- </nav><!-- #site-navigation -->
- </header><!-- #masthead -->
- <div id="main" class="site-main">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement