Need help using get_posts
-
I am trying to pull only one specific post using get_posts, but I can not seem to get that to work. What I have now works, but it pulls the most recent post. I want to pull a SPECIFIC post, by id or some other similar way. Can you please help me out?
Here is the code I am using:
<div class="sponsor"> <?php global $post; $myposts = get_posts('category=9&numberposts=1'); foreach($myposts as $post) : setup_postdata($post); ?> <div class="sponsortext"> <?php the_excerpt(); ?> </div> <div class="break"></div> <?php endforeach; ?> </div>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Need help using get_posts’ is closed to new replies.