3, 'post_type' => 'post', 'ignore_sticky_posts' => true, ); $query_slider_posts = new WP_Query( $args ); while ( $query_slider_posts->have_posts() ) : $query_slider_posts->the_post(); $thumbnail = ''; if ( has_post_thumbnail() ) { $thumbnail = 'style="background-image: url(' . esc_url(get_the_post_thumbnail_url( get_the_ID() )) . ')"'; } ?>
>

-