$post_types, 'orderby' => 'rand', 'order' => 'DESC', 'posts_per_page' => bard_options( 'featured_slider_amount' ), 'ignore_sticky_posts' => 1, 'meta_query' => array( array( 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ) ), ); if ( bard_options( 'featured_slider_display' ) === 'category' ) { $args['cat'] = bard_options( 'featured_slider_category' ); } $sliderQuery = new WP_Query(); $sliderQuery->query( $args ); // Loop Start if ( $sliderQuery->have_posts() ) : while ( $sliderQuery->have_posts() ) : $sliderQuery->the_post(); $featured_image = get_the_post_thumbnail_url(); ?>