get_posts is retrieving too much
-
On my site, the top drop-down menu ought to contain each post in the specified category. I used get_posts to do this; however, both the ABOUT and ACADEMICS are listing posts that aren’t in their categories. I’ve double-checked to make sure each post is in the right category and each category doesn’t have a parent or anything. Is there something that I’m missing? Here’s my get_posts:
<?php global $post; $myposts = get_posts('numberposts=-1&category=5&orderby=post_title&order=ASC'); foreach($myposts as $post) : setup_postdata($post); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php endforeach; ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘get_posts is retrieving too much’ is closed to new replies.