Last active
August 29, 2015 14:06
-
-
Save jeffikus/8661b9872dad343ac108 to your computer and use it in GitHub Desktop.
For the Cause image slider full height - after
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
$style = ''; | |
$featured_height = ''; | |
if ( '' != $image_bg ) { | |
$featured_height_id = get_post_thumbnail_id(); | |
$featured_height = wp_get_attachment_image_src( $featured_height_id, 'large' ); | |
$featured_height = ' height: ' . $featured_height[ 2 ] . 'px;'; | |
$style = ' style="background-size: cover; background-image: url(' . $image_bg . ');' . $featured_height . '"'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment