Skip to content

Instantly share code, notes, and snippets.

@jeffikus
Last active August 29, 2015 14:06
Show Gist options
  • Save jeffikus/8661b9872dad343ac108 to your computer and use it in GitHub Desktop.
Save jeffikus/8661b9872dad343ac108 to your computer and use it in GitHub Desktop.
For the Cause image slider full height - after
$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