Skip to content

Instantly share code, notes, and snippets.

@jeffikus
Created September 15, 2014 12:37
Show Gist options
  • Save jeffikus/37dc918cecc9f5a5ecfa to your computer and use it in GitHub Desktop.
Save jeffikus/37dc918cecc9f5a5ecfa to your computer and use it in GitHub Desktop.
For the Cause image slider full height - before
$style = '';
$featured_height = '';
if ( '' != $image_bg ) {
if ( '' == $title && '' == $content && '' == $embed ) {
$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