WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Filter Results Sorted by Title Alphabetically

[Resolved] Filter Results Sorted by Title Alphabetically

Viewing 1 replies (of 1 total)
  • I was able to find a solution. By replacing my themes’s archive.php (Other themes might use category.php) loop function with the code below. Replace ‘Category’ with the name of the category you would like sorted alphabetically by title.

    <?php
    // we add this, to show all posts in our
    // Glossary sorted alphabetically
    if (is_category('Category'))
    {
         $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(); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Filter Results Sorted by Title Alphabetically’ is closed to new replies.