[Resolved] archive.php showing posts alphabetically
I want to show the search results alphabetically on my archive.php page as I have it set on my index page.
I used the following code on my index page.
<?php // we add this, to show *all* posts sorted // alphabetically by title $posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1'); // here comes The Loop! if (have_posts()) : while (have_posts()) : the_post(); ?>
but when I replace the
<?php while (have_posts()) : the_post(); ?>
code on the archive page it shows nothing.
can anyone help?
thanks for your time.
- The topic ‘[Resolved] archive.php showing posts alphabetically’ is closed to new replies.