query_posts()
can alter the WP query even when it is executed and it should be placed at least before you start the loop i.e. have_posts()
. Currently you are placing it after setting up post data i.e. the_post()
. Which is resulting in unexpected behavior.
Example:
global $query_string; //Get current query arguments
query_posts($query_string."&featured=yes");
if (have_posts()) {
while (have_posts()) {
the_post(); ?>
<? php the_author(); ?>
<? php
if (has_post_thumbnail()) {
the_post_thumbnail('thumbnail');
} ?>
<a href = "https://wordpress.stackexchange.com/questions/221880/<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<a href = "https://wordpress.stackexchange.com/questions/221880/<?php the_permalink(); ?>"> Read More.... </a>
<?php
} // end while
} // end if
NOTE:
query_posts()
is not recommended please ask plugin support to
provide alternative way to use their plugin!