I am trying to create a part on my wordpress theme that will only display one featured post. I have installed this plugin - https://wordpress.org/plugins/featured-post/ .
I know I am supposed to integrate <?php query_posts($query_string."&featured=yes");
somewhere into the loop to output the featured post. I tried modifying the code from my existing loop that displays regular posts but the results show the featured post repeated many times.
This is the loop I am trying to use that displays the featured post but repeats it a ton of times. How can I get it to only display once?
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
query_posts($query_string . "&featured=yes");
the_author();
if ( has_post_thumbnail() ) {
the_post_thumbnail('thumbnail');
}
?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_excerpt();?>
<a href="<?php the_permalink(); ?>"> Read More.... </a>
<?php
} // end while
} // end if
?>
query_posts($query_string."&featured=yes")
?