-
-
Save anonymous/55627843780c58206dad to your computer and use it in GitHub Desktop.
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 if ( is_page() && get_post_meta( $post->ID, "hero_slider", TRUE ) != '' ) { ?> | |
<div id="hero-section" class="slider-hero <?php echo get_post_meta($post->ID, "hero_height", TRUE); ?>"> | |
<?php | |
$slider = get_post_meta( $post->ID, "hero_slider", TRUE ); | |
echo do_shortcode( $slider ); | |
?> | |
<div class="slider-copy"> | |
<div class="hero-copy <?php echo get_post_meta($post->ID, "hero_alignment", TRUE); ?>"> | |
<?php if ( get_post_meta($post->ID, "hero_title", $single = true ) != ""){ ?> | |
<div class="hero-title-holder"> | |
<h2 class="hero-title"><?php echo get_post_meta($post->ID, "hero_title", TRUE); ?></h2> | |
</div> | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_caption", $single = true ) != ""){ ?> | |
<div class="hero-caption"> | |
<?php echo do_shortcode( wpautop( get_post_meta( $post->ID, 'hero_caption', true) ) ); ?> | |
</div> | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_button_text", $single = true ) != ""){ ?> | |
<div class="hero-button-holder"> | |
<a class="button hero" href="<?php echo get_post_meta($post->ID, "hero_button_url", TRUE); ?>"><?php echo get_post_meta($post->ID, "hero_button_text", TRUE); ?></a> | |
</div> | |
<?php } ?> | |
</div> | |
</div> | |
<style> | |
<?php if ( get_post_meta( $post->ID, "hero_title_color", $single = true ) != "" ){ ?> | |
.hero-copy h2.hero-title, | |
.hero-copy p { | |
color: <?php echo get_post_meta($post->ID, "hero_title_color", TRUE); ?>; | |
} | |
.hero-title { | |
border-color: <?php echo get_post_meta($post->ID, "hero_title_color", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_button_text_color", $single = true ) != "" ) { ?> | |
.hero-copy a.button.hero { | |
color: <?php echo get_post_meta($post->ID, "hero_button_text_color", TRUE); ?>; | |
border-color: <?php echo get_post_meta($post->ID, "hero_button_text_color", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_button_text_hover", $single = true ) != "" ) { ?> | |
.hero-copy a.button.hero:hover { | |
color: <?php echo get_post_meta($post->ID, "hero_button_text_hover", TRUE); ?>; | |
border-color: <?php echo get_post_meta($post->ID, "hero_button_text_hover", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_color", $single = true ) != "" ) { ?> | |
nav#top-menu li a, | |
nav#top-menu li a:visited { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_color", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_color_hover", $single = true ) != "" ) { ?> | |
nav#top-menu li.current-menu-item a, | |
nav#top-menu li a:hover { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_color_hover", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_drop_background", $single = true ) != "" ) { ?> | |
nav#top-menu ul li:hover ul { | |
background-color: <?php echo get_post_meta($post->ID, "hero_navigation_drop_background", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_drop_item", $single = true ) != "" ) { ?> | |
#header nav#top-menu ul ul li a, | |
#header nav#top-menu ul ul li a:visited, | |
#header nav#top-menu ul ul ul li a, | |
#header nav#top-menu ul ul ul li a:visited, | |
#header nav#top-menu ul li.current-menu-item ul li a, | |
#header nav#top-menu ul li.current-menu-item ul li a:visited { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_drop_item", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_drop_item_hover", $single = true ) != "" ) { ?> | |
#header nav#top-menu ul ul li a:hover, | |
#header nav#top-menu ul li ul li.current-menu-item a, | |
#header nav#top-menu ul li.current-menu-item a:hover { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_drop_item_hover", TRUE); ?>; | |
} | |
<?php } ?> | |
</style> | |
</div><!-- #hero-section --> | |
<?php } else if ( is_page() && has_post_thumbnail() ) { ?> | |
<div id="hero-section" class="<?php echo get_post_meta($post->ID, "hero_height", TRUE); ?>"> | |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?> | |
<?php if ( ( get_post_meta( $post->ID, "hero_mp4", $single = true ) != "" ) || ( get_post_meta( $post->ID, "hero_youtube", $single = true ) != "" ) ) { ?> | |
<script> | |
// Hero section background video | |
jQuery("#hero-section").wallpaper({ | |
mute: <?php if ( get_post_meta($post->ID, "mute", $single = true) != "" ) { ?> true,<?php } else {?>false,<?php } ?> | |
source: { | |
poster: "", | |
<?php if ( get_post_meta( $post->ID, "hero_mp4", $single = true ) != "" ){ ?> | |
mp4: "<?php echo get_post_meta($post->ID, "hero_mp4", TRUE); ?>", | |
<?php } if ( get_post_meta( $post->ID, "hero_ogg", $single = true ) != "" ){ ?> | |
ogg: "<?php echo get_post_meta($post->ID, "hero_ogg", TRUE); ?>", | |
<?php } if ( get_post_meta( $post->ID, "hero_webm", $single = true ) != "" ){ ?> | |
webm: "<?php echo get_post_meta($post->ID, "hero_webm", TRUE); ?>", | |
<?php } if ( get_post_meta( $post->ID, "hero_youtube", $single = true ) != "" ){ ?> | |
video: "<?php echo get_post_meta($post->ID, "hero_youtube", TRUE); ?>" | |
<?php } ?> | |
} | |
}); | |
</script> | |
<?php } ?> | |
<style> | |
#hero-section { background-image: url(<?php echo $image[0]; ?>) } | |
<?php if ( get_post_meta( $post->ID, "hero_title_color", $single = true ) != "" ){ ?> | |
.hero-copy h2.hero-title, | |
.hero-copy p { | |
color: <?php echo get_post_meta($post->ID, "hero_title_color", TRUE); ?>; | |
} | |
.hero-title { | |
border-color: <?php echo get_post_meta($post->ID, "hero_title_color", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_button_text_color", $single = true ) != "" ) { ?> | |
.hero-copy a.button.hero { | |
color: <?php echo get_post_meta($post->ID, "hero_button_text_color", TRUE); ?>; | |
border-color: <?php echo get_post_meta($post->ID, "hero_button_text_color", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_button_text_hover", $single = true ) != "" ) { ?> | |
.hero-copy a.button.hero:hover { | |
color: <?php echo get_post_meta($post->ID, "hero_button_text_hover", TRUE); ?>; | |
border-color: <?php echo get_post_meta($post->ID, "hero_button_text_hover", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_color", $single = true ) != "" ) { ?> | |
nav#top-menu li a, | |
nav#top-menu li a:visited { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_color", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_color_hover", $single = true ) != "" ) { ?> | |
nav#top-menu li.current-menu-item a, | |
nav#top-menu li a:hover { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_color_hover", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_drop_background", $single = true ) != "" ) { ?> | |
nav#top-menu ul li:hover ul { | |
background-color: <?php echo get_post_meta($post->ID, "hero_navigation_drop_background", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_drop_item", $single = true ) != "" ) { ?> | |
#header nav#top-menu ul ul li a, | |
#header nav#top-menu ul ul li a:visited, | |
#header nav#top-menu ul ul ul li a, | |
#header nav#top-menu ul ul ul li a:visited, | |
#header nav#top-menu ul li.current-menu-item ul li a, | |
#header nav#top-menu ul li.current-menu-item ul li a:visited { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_drop_item", TRUE); ?>; | |
} | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_navigation_drop_item_hover", $single = true ) != "" ) { ?> | |
#header nav#top-menu ul ul li a:hover, | |
#header nav#top-menu ul li ul li.current-menu-item a, | |
#header nav#top-menu ul li.current-menu-item a:hover { | |
color: <?php echo get_post_meta($post->ID, "hero_navigation_drop_item_hover", TRUE); ?>; | |
} | |
<?php } ?> | |
</style> | |
<div class="hero-copy <?php echo get_post_meta($post->ID, "hero_alignment", TRUE); ?>"> | |
<?php if ( get_post_meta($post->ID, "hero_title", $single = true ) != ""){ ?> | |
<div class="hero-title-holder"> | |
<h2 class="hero-title"><?php echo get_post_meta($post->ID, "hero_title", TRUE); ?></h2> | |
</div> | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_caption", $single = true ) != ""){ ?> | |
<div class="hero-caption"> | |
<?php echo do_shortcode( wpautop( get_post_meta( $post->ID, 'hero_caption', true) ) ); ?> | |
</div> | |
<?php } ?> | |
<?php if ( get_post_meta($post->ID, "hero_button_text", $single = true ) != ""){ ?> | |
<div class="hero-button-holder"> | |
<a class="button hero" href="<?php echo get_post_meta($post->ID, "hero_button_url", TRUE); ?>"><?php echo get_post_meta($post->ID, "hero_button_text", TRUE); ?></a> | |
</div> | |
<?php } ?> | |
</div> | |
</div><!-- #hero-section --> | |
<?php } elseif ( is_post_type_archive( 'tribe_events' ) && ( of_get_option('calendar_hero_include') == '1' ) ) { ?> | |
<div id="hero-section" class="<?php echo of_get_option( 'calendar_hero_height' ); ?>"> | |
<style> | |
#hero-section { background-image: url(<?php echo of_get_option( 'calendar_hero_image' ); ?>) } | |
<?php if ( of_get_option( 'calendar_hero_title_color' ) != "" ){ ?> | |
.hero-copy h2.hero-title, | |
.hero-copy p { | |
color: <?php echo of_get_option( 'calendar_hero_title_color' ); ?>; | |
} | |
.hero-title { | |
border-color: <?php echo of_get_option( 'calendar_hero_title_color' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_title_color' ) != "" ) { ?> | |
.hero-copy a.button.hero { | |
color: <?php echo of_get_option( 'calendar_hero_button_text_color' ); ?>; | |
border-color: <?php echo of_get_option( 'calendar_hero_button_text_color' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_button_text_hover' ) != "" ) { ?> | |
.hero-copy a.button.hero:hover { | |
color: <?php echo of_get_option( 'calendar_hero_button_text_hover' ); ?>; | |
border-color: <?php echo of_get_option( 'calendar_hero_button_text_hover' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_navigation_color' ) != "" ) { ?> | |
nav#top-menu li a, | |
nav#top-menu li a:visited { | |
color: <?php echo of_get_option( 'calendar_hero_navigation_color' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_navigation_color_hover' ) != "" ) { ?> | |
nav#top-menu li.current-menu-item a, | |
nav#top-menu li a:hover { | |
color: <?php echo of_get_option( 'calendar_hero_navigation_color_hover' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_navigation_drop_background' ) != "" ) { ?> | |
nav#top-menu ul li:hover ul { | |
background-color: <?php echo of_get_option( 'calendar_hero_navigation_drop_background' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_navigation_drop_item' ) != "" ) { ?> | |
#header nav#top-menu ul ul li a, | |
#header nav#top-menu ul ul li a:visited, | |
#header nav#top-menu ul ul ul li a, | |
#header nav#top-menu ul ul ul li a:visited, | |
#header nav#top-menu ul li.current-menu-item ul li a, | |
#header nav#top-menu ul li.current-menu-item ul li a:visited { | |
color: <?php echo of_get_option( 'calendar_hero_navigation_drop_item' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_navigation_drop_item_hover' ) != "" ) { ?> | |
#header nav#top-menu ul ul li a:hover, | |
#header nav#top-menu ul li ul li.current-menu-item a, | |
#header nav#top-menu ul li.current-menu-item a:hover { | |
color: <?php echo of_get_option( 'calendar_hero_navigation_drop_item_hover' ); ?>; | |
} | |
<?php } ?> | |
</style> | |
<div class="hero-copy <?php echo of_get_option( 'calendar_hero_alignment' ); ?>"> | |
<?php if ( of_get_option( 'calendar_hero_title' ) != ""){ ?> | |
<div class="hero-title-holder"> | |
<h2 class="hero-title"><?php echo of_get_option( 'calendar_hero_title' ); ?></h2> | |
</div> | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_caption' ) != ""){ ?> | |
<div class="hero-caption"> | |
<p><?php echo of_get_option( 'calendar_hero_caption' ); ?></p> | |
</div> | |
<?php } ?> | |
<?php if ( of_get_option( 'calendar_hero_button' ) != ""){ ?> | |
<div class="hero-button-holder"> | |
<a class="button hero" href="<?php echo of_get_option( 'calendar_hero_button_url' ); ?>"><?php echo of_get_option( 'calendar_hero_button' ); ?></a> | |
</div> | |
<?php } ?> | |
</div> | |
</div><!-- #hero-section --> | |
<?php } elseif ( is_home() && ( of_get_option('blog_hero_include') == '1' ) ) { ?> | |
<div id="hero-section" class="<?php echo of_get_option( 'blog_hero_height' ); ?>"> | |
<style> | |
#hero-section { background-image: url(<?php echo of_get_option( 'blog_hero_image' ); ?>) } | |
<?php if ( of_get_option( 'blog_hero_title_color' ) != "" ){ ?> | |
.hero-copy h2.hero-title, | |
.hero-copy p { | |
color: <?php echo of_get_option( 'blog_hero_title_color' ); ?>; | |
} | |
.hero-title { | |
border-color: <?php echo of_get_option( 'blog_hero_title_color' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_title_color' ) != "" ) { ?> | |
.hero-copy a.button.hero { | |
color: <?php echo of_get_option( 'blog_hero_button_text_color' ); ?>; | |
border-color: <?php echo of_get_option( 'blog_hero_button_text_color' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_button_text_hover' ) != "" ) { ?> | |
.hero-copy a.button.hero:hover { | |
color: <?php echo of_get_option( 'blog_hero_button_text_hover' ); ?>; | |
border-color: <?php echo of_get_option( 'blog_hero_button_text_hover' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_navigation_color' ) != "" ) { ?> | |
nav#top-menu li a, | |
nav#top-menu li a:visited { | |
color: <?php echo of_get_option( 'blog_hero_navigation_color' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_navigation_color_hover' ) != "" ) { ?> | |
nav#top-menu li.current-menu-item a, | |
nav#top-menu li a:hover { | |
color: <?php echo of_get_option( 'blog_hero_navigation_color_hover' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_navigation_drop_background' ) != "" ) { ?> | |
nav#top-menu ul li:hover ul { | |
background-color: <?php echo of_get_option( 'blog_hero_navigation_drop_background' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_navigation_drop_item' ) != "" ) { ?> | |
#header nav#top-menu ul ul li a, | |
#header nav#top-menu ul ul li a:visited, | |
#header nav#top-menu ul ul ul li a, | |
#header nav#top-menu ul ul ul li a:visited, | |
#header nav#top-menu ul li.current-menu-item ul li a, | |
#header nav#top-menu ul li.current-menu-item ul li a:visited { | |
color: <?php echo of_get_option( 'blog_hero_navigation_drop_item' ); ?>; | |
} | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_navigation_drop_item_hover' ) != "" ) { ?> | |
#header nav#top-menu ul ul li a:hover, | |
#header nav#top-menu ul li ul li.current-menu-item a, | |
#header nav#top-menu ul li.current-menu-item a:hover { | |
color: <?php echo of_get_option( 'blog_hero_navigation_drop_item_hover' ); ?>; | |
} | |
<?php } ?> | |
</style> | |
<div class="hero-copy <?php echo of_get_option( 'blog_hero_alignment' ); ?>"> | |
<?php if ( of_get_option( 'blog_hero_title' ) != ""){ ?> | |
<div class="hero-title-holder"> | |
<h2 class="hero-title"><?php echo of_get_option( 'blog_hero_title' ); ?></h2> | |
</div> | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_caption' ) != ""){ ?> | |
<div class="hero-caption"> | |
<p><?php echo of_get_option( 'blog_hero_caption' ); ?></p> | |
</div> | |
<?php } ?> | |
<?php if ( of_get_option( 'blog_hero_button' ) != ""){ ?> | |
<div class="hero-button-holder"> | |
<a class="button hero" href="<?php echo of_get_option( 'blog_hero_button_url' ); ?>"><?php echo of_get_option( 'blog_hero_button' ); ?></a> | |
</div> | |
<?php } ?> | |
</div> | |
</div><!-- #hero-section --> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment