how to sort by alphabet?
-
i have a template page which contains all my posts.
the list of posts is sorted by date, i want to sort it by alphabet of the post title
the code i have is this<?php $debut = 0; //The first article to be displayed ?> <?php while(have_posts()) : the_post(); ?> <h2><?php the_title(); ?></h2> <ul> <?php $myposts = get_posts('numberposts=-1&offset=$debut'); foreach($myposts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ul> <?php endwhile; ?>
what can i do to sort it as alphabet?
thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how to sort by alphabet?’ is closed to new replies.