array('post','page'), 'post__in' => $fitness_insight_post, 'ignore_sticky_posts' => true, // Exclude sticky posts by default ); // Check if specific posts are selected if (empty($fitness_insight_post) && is_sticky()) { $args['post__in'] = get_option('sticky_posts'); } $query = new WP_Query( $args ); if ( $query->have_posts() ) : $s = 1; ?> have_posts() ) : $query->the_post(); ?>

>