I have a Custom Query that displays 5 posts that have a certain meta value (featured posts). On the same page, I have a regular old Loop. I would like to exclude the posts displayed in the Custom Query from the Loop. Another problem is that the Custom Query and The Loop are in different functions in the functions.php file so variable values don’t carry over between the two.
Any help would be greatly appreciated!
Basically, you’re building a slider and you don’t want the posts in the slider also showing up in the loop?
<?php query_posts(’showposts=8?); ?> <?php while (have_posts()) : the_post(); if (array_search(get_the_ID(), $do_not_duplicate) !== false) continue; update_post_caches($posts); ?> CONTENT GOES HERE <?php endwhile; ?>