i am trying to sort my multiple category’s posts in alphabetical order on a page. I am using following code in my custom created page (ilc.php) and 29,28,27,26,25,24,23,22,21,20,19,18,16,15,14,13,12,11,10,9,8 are the category ids whose posts I want on the page:
$temp = $wp_query;
$wp_query = new WP_Query();
<?php global $more; $more = 0; ?>
<?php while ($wp_query->have_posts()): $wp_query->the_post();?>
<?php endwhile; ?>
<?php //...pagination code?>
the included page “inst-post.php” contains following code:
etc, but they also dont work. On the result page the posts come in the table but they are ordered by their ID ie. whatever orderby I am using it doesnt work for me 🙁 the posts show up according to the category-id order.
Kindly help me in sorting the posts.
The topic ‘sorting all posts in alphabetical order’ is closed to new replies.