how to change wordpress post order category wise

When we need to re-arrange my recent post in wordpress so they go Ascending/Descending order category wise. We can easily achieve this using wordpress api.

use following code:


<?php

//The Query
query_posts('cat=1,3,3&posts_per_page=15&order=ASC');

//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
 ..
endwhile; else:
 ..
endif;

?>

You may like following Articles!

25 thoughts on “how to change wordpress post order category wise

  1. Pingback: Tweets that mention how to change wordpress post order category wise | Wordpressapi.com - Developer Code book -- Topsy.com

  2. What youre saying is completely true. I know that everybody must say the same thihttp://www.adsense-id.com/forums/images/vtc/36_002.gifng, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say.

  3. Nice post! You truly have a wonderful way of writing which I find captivating! I will definitely be bookmarking you and returning to your blog. In fact, your post reminded me about a strange thing that happened to me the other day. I’ll tell you about that later…

  4. Nice post! You truly have a wonderful way of writing which I find captivating! I will definitely be bookmarking you and returning to your blog. In fact, your post reminded me about a strange thing that happened to me the other day. I’ll tell you about that later…

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>