Exclude Current ‘Featured Post’ from ‘More Posts’
-
I have a video theme that allows you to show a ‘Featured Video’ and then a list of ‘More Videos’ under it from a category you choose. The problem I’m running into is that it’s showing the ‘Featured Video’ again right under itself in the ‘More Videos’ section because I’m picking the same category for ‘Featured Video’ and ‘More Videos’. Here is the code:
<div id="featuredvideo"> <?php $featured_vid_1 = get_option('tubular_featured_vid_1'); $featured_vid_1_num = get_option('tubular_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?> <?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?> <div class="postarea"> <h3>Featured Episode</h3> <div class="entry"> <div class="videoborder"> <?php the_content(__('Read more'));?> </div> <div class="videoleft"> <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1> <p class="date">Posted on <?php the_time('m.d.y'); ?> by <?php the_author(); ?></p> </div> <div class="videoright"> <p><?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?></p> </div> <div style="clear:both;"></div> </div> </div> <?php endwhile; ?> </div> <div id="hpbottom"> <?php $featured_vid_2 = get_option('tubular_featured_vid_2'); $featured_vid_2_num = get_option('tubular_featured_vid_2_num'); if(!$featured_vid_2) $featured_vid_2 = 1; //setting a default ?> <?php $recent = new WP_Query("cat=".$featured_vid_2."&showposts=".$featured_vid_2_num); while($recent->have_posts()) : $recent->the_post();?> <div class="videos"> <div class="videosleft"> <?php the_content(__('Read more'));?> </div>
How can I exclude the current ‘Featured Video’ from the ‘More Videos’ list?
Thanks
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Exclude Current ‘Featured Post’ from ‘More Posts’’ is closed to new replies.