Created
April 24, 2017 03:49
-
-
Save chrismcintosh/e497e41f03025345ca6c7110aea343cd 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 | |
$image = get_sub_field('background_image'); | |
if( !empty($image) ): | |
// thumbnail | |
$size = 'large'; | |
$thumb = $image['sizes'][ $size ]; | |
endif; | |
?> | |
<div class="hero" style="background: url('<?php echo $thumb; ?>')"> | |
<div class="overlay"> | |
<div class="department-badge"> | |
<img src="<?php the_sub_field('badge'); ?>" /> | |
</div> | |
<div class="text"> | |
<?php the_sub_field( 'text' ); ?> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment