Sort alphabetically by title not working for me
I need to display my post titles alphabetically. I have used the code suggested in the codex and have read several articles on the subject, but it doesn’t seem to be working for me. I have inserted at the top of my index.php page:
$posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1');
if (have_posts()) : while (have_posts()) : the_post(); ?>
But my page still sorts by date.
I have also tried this to no avail:
<div id='tab_pages' class="menupage" style="display: none;">
<h2><?php _e('Chapters:'); ?></h2>
$posts = get_posts('orderby=title&order=asc');
foreach($posts as $post) :
Please help!!!! I need to get this working. Thanks
- The topic ‘Sort alphabetically by title not working for me’ is closed to new replies.