Last active
August 29, 2015 13:57
-
-
Save billrobbins/9865715 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 } elseif ( has_page_template( 'page-home-template.php' ) ) { ?> | |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?> | |
<div class="hero-copy <?php echo get_post_meta($post->ID, "hero_alignment", TRUE); ?>"> | |
<!-- Your Content --> | |
</div> | |
<style> | |
<?php if(get_post_meta($post->ID, "hero_image", $single = true) != ""){ ?> | |
#hero-section { background-image: url(<?php echo get_post_meta($post->ID, "hero_image", TRUE); ?>) } | |
<?php } else { ?> | |
#hero-section { background-image: url(<?php echo $image[0]; ?>) } | |
<?php } ?> | |
<?php if(get_post_meta($post->ID, "hero_title_color", $single = true) != ""){ ?> | |
.hero-copy h2.hero-title { color: <?php echo get_post_meta($post->ID, "hero_title_color", TRUE); ?> } | |
<?php } ?> | |
<?php if(get_post_meta($post->ID, "hero_title_background", $single = true) != ""){ ?> | |
.hero-copy h2.hero-title { background-color: <?php echo get_post_meta($post->ID, "hero_title_background", TRUE); ?> } | |
<?php } ?> | |
<?php if(get_post_meta($post->ID, "hero_text_color", $single = true) != ""){ ?> | |
.hero-copy p { color: <?php echo get_post_meta($post->ID, "hero_text_color", TRUE); ?> } | |
<?php } ?> | |
<?php if(get_post_meta($post->ID, "hero_text_background", $single = true) != ""){ ?> | |
.hero-copy p { background-color: <?php echo get_post_meta($post->ID, "hero_text_background", 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); ?> } | |
<?php } ?> | |
<?php if(get_post_meta($post->ID, "hero_button_background", $single = true) != ""){ ?> | |
.hero-copy a.button.hero { background-color: <?php echo get_post_meta($post->ID, "hero_button_background", 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); ?> } | |
<?php } ?> | |
<?php if(get_post_meta($post->ID, "hero_button_background_hover", $single = true) != ""){ ?> | |
.hero-copy a.button.hero:hover { background-color: <?php echo get_post_meta($post->ID, "hero_button_background_hover", TRUE); ?> } | |
<?php } ?> | |
</style> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment