Wordpress Post order

Posted by kwek-kwek on Stack Overflow See other posts from Stack Overflow or by kwek-kwek
Published on 2010-04-30T18:37:11Z Indexed on 2010/04/30 18:57 UTC
Read the original article Hit count: 307

Filed under:
|
|

I wanted to re-arrange my post in wordpress so they go Ascending/Descending.

Here is my code:

<ul>
<?php $postslist = get_posts('cat=3,4,5,numberposts=5&order=DESC&orderby=date'); 
foreach ($postslist as $post) : setup_postdata($post); ?>
<li>
<span class="date"><?php the_time('M j') ?></span>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</li>
<?php endforeach; ?>

</ul>

Each post is pulled from different categories.

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about wordpress-loop