Support » Fixing WordPress » Featured Posts Code – Repeated featured posts

  • I am soooo close to getting this to work but I have two outstanding issues.

    1. The featured posts code keeps repeating itself before/after each post.

    2. It seems that the “info” class shows two hrefs for the posts I am calling in CSS.

    Any help would be greatly appreciated. The code below is what is currently in my loop.

    <?php if( is_front_page() ) : ?>
    <?php query_posts("posts_per_page=3&category_name=featured");?>
           <?php while (have_posts()) : the_post(); ?>
           <div class="featureportfolio<?php echo $i++;?>">
           <a href="<?php the_permalink() ?>" rel="bookmark" class="title">
           <?php the_post_thumbnail('thumbnail'); ?>
           <div class="info">
           <a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
           </div>
           </div>
    <?php endwhile;?>
    <?php endif; ?>
    <div class="clear"></div>
    <?php wp_reset_query(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Featured Posts Code – Repeated featured posts’ is closed to new replies.