Show latest posts but no double posts
-
Hello,
I’m currently using the query:
<?php $categories = get_categories('hide_empty=1'); foreach ($categories as $category) : query_posts("showposts=1&cat=" .$category->cat_ID); if (have_posts()) : the_post(); ?>
to show the latest post from every category on my front page.
Because I’m using child categories I have many double posts on my front page. How can I remove the double posts? (I have a category named CAT and a child category named CHILD. CAT is empty and CHILD containts a post. Why does WP show up the post two times? ?? )
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show latest posts but no double posts’ is closed to new replies.