http://codex.wordpress.org/Template_Tags/get_posts
Read example above and pay particular attention to the parameter numberposts and offset
Yeah, you’ll want to run multiple Loops.
very cool. I’ll try it out now.
I’ve always shown the most recent 10 posts in the body on my front page. Now I want to show posts 11-20 on the sidebar. The code I’m using is:
<ul>
<?php
$posts = get_posts('numberposts=10&offset=11');
foreach($posts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
It’s now showing the 11-20 most recent posts in the body and sidebar now. How do I get this to work?
Post the whole content of the file that you have now, including the recent addition: http://paste.uni.cc
The change I made was only in the sidebar.php file.
Teh above code is taking posts 11-20 and listing them in sidebar and body.
I need the body to be 1-10.
I read somewhere I need to make another loop?.?.