Last active
December 13, 2019 20:23
-
-
Save tradesouthwest/b2988ecfa80241fe9d5825299e72d587 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 child-them custom full width page template | |
* | |
* 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 Blossom_Spa | |
* ******************************************** | |
* @sub-package FILE NAME IS: `header-full.php` | |
* ******************************************** | |
*/ | |
/** | |
* Doctype Hook | |
* | |
* @hooked blossom_spa_doctype | |
*/ | |
do_action( 'blossom_spa_doctype' ); | |
?> | |
<head itemscope itemtype="http://schema.org/WebSite"> | |
<?php | |
/** | |
* Before wp_head | |
* | |
* @hooked blossom_spa_head | |
*/ | |
do_action( 'blossom_spa_before_wp_head' ); | |
wp_head(); ?> | |
</head> | |
<body <?php body_class(); ?> itemscope itemtype="http://schema.org/WebPage"> | |
<?php | |
wp_body_open(); | |
/** | |
* Before Header | |
* | |
* @hooked blossom_spa_page_start - 20 | |
*/ | |
do_action( 'blossom_spa_before_header' ); | |
/** | |
* Header | |
* | |
* @hooked blossom_spa_responsive_nav - 10 | |
* @hooked blossom_spa_header - 20 | |
*/ | |
do_action( 'blossom_spa_header' ); ?> | |
<?php | |
$ed_banner = get_theme_mod( 'ed_banner_section', 'static_banner' ); | |
$banner_title = get_theme_mod( 'banner_title', __( 'Relaxing Is Never Easy On Your Own', 'blossom-spa' ) ); | |
$banner_subtitle = get_theme_mod( 'banner_subtitle', __( 'Come and discover your oasis. It has never been easier to take a break from stress and the harmful factors that surround you every day!', 'blossom-spa' ) ); | |
$button1 = get_theme_mod( 'banner_cta1', __( 'View services', 'blossom-spa' ) ); | |
$button2 = get_theme_mod( 'banner_cta2', __( 'Book Now', 'blossom-spa' ) ); | |
$button1_url = get_theme_mod( 'banner_cta1_url', '#' ); | |
$button2_url = get_theme_mod( 'banner_cta2_url', '#' ); | |
if( $ed_banner ){ ?> | |
<div id="banner_section" class="site-banner<?php if( has_header_video() ) echo esc_attr( ' video-banner' ); ?>"> | |
<div class="item"> | |
<?php | |
the_custom_header_markup(); | |
if( ! has_header_video() ){ | |
if( $banner_title || $banner_subtitle || ( $button1 && $button1_url ) || ( $button2 && $button2_url ) ){ | |
echo '<div class="banner-caption center"><div class="container"><div class="banner-caption-inner">'; | |
if( $banner_title ) echo '<h2 class="title">' . esc_html( $banner_title ) . '</h2>'; | |
if( $banner_subtitle ) echo '<div class="description">' . wpautop( wp_kses_post( $banner_subtitle ) ) . '</div>'; | |
if( $button1 || $button2 ) : ?> | |
<div class="btn-wrap"> | |
<?php if( $button1 && $button1_url ) : ?> | |
<a href="<?php echo esc_url( $button1_url ); ?>" class="btn btn-transparent"> | |
<span><?php echo esc_html( $button1 ); ?></span> | |
<i class="fas fa-chevron-right"></i> | |
</a> | |
<?php endif; ?> | |
<?php if( $button2 && $button2_url ) : ?> | |
<a href="<?php echo esc_url( $button2_url ); ?>" class="btn btn-green"> | |
<span><?php echo esc_html( $button2 ); ?></span> | |
<i class="fas fa-chevron-right"></i> | |
</a> | |
<?php endif; ?> | |
</div> | |
<?php endif; | |
echo '</div></div></div>'; | |
} | |
}else{ | |
if( $banner_title ) { | |
echo '<div class="banner-caption center"><div class="container"><div class="banner-caption-inner">'; | |
if( $banner_title ) echo '<h2 class="title">' . esc_html( $banner_title ) . '</h2>'; | |
echo '</div></div></div>'; | |
} | |
} | |
?> | |
</div> | |
</div> | |
<?php } ?> | |
<?php | |
/** | |
* Content | |
* | |
* @hooked blossom_spa_content_start | |
*/ | |
do_action( 'blossom_spa_content' ); | |
// end header file | |
?> | |
<?php | |
/** | |
* The above and the below are TWO SEPARATE FILES. | |
* The below template file name is `full-width-page.php` | |
****************************************************** | |
*/ | |
?> | |
<?php | |
/** | |
* Template Name: Full Width Page | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site may use a | |
* different template. | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
* | |
* @package Blossom_Spa | |
*/ | |
get_header( 'full' ); ?> | |
<div id="primary full-container" class="content-area"> | |
<main id="main" class="site-main full-width-main"> | |
<?php | |
while ( have_posts() ) : the_post(); | |
get_template_part( 'template-parts/content', 'page' ); | |
/** | |
* Comment Template | |
* | |
* @hooked blossom_spa_comment | |
*/ | |
do_action( 'blossom_spa_after_page_content' ); | |
endwhile; // End of the loop. | |
?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment