Sorting Posts in Alphabetical Order
-
So I have this query which lists all the posts by category on a sidebar. I want to expand it slightly so that it lists the posts in alphabetical order.
Code is as follows:
<ul class="sidebar"> <?php $recent = new WP_Query("cat=3&showposts=10"); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul>
Any help would be appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sorting Posts in Alphabetical Order’ is closed to new replies.