Add Featured Image as a Background Image
Below is how you would use the featured image as a background image (also with an if statement so you can have a fallback image). <?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘single-post-thumbnail’ ); $image = $image[0]; ?> <?php else : $image = get_bloginfo( ‘stylesheet_directory’) . ‘/images/default_cat_img.jpg’; ?> … Continued