• Resolved veenublue

    (@veenublue)


    I can’t seem to find the codex for code to list my archive (when you click on the categories) in alpha order instead of by date. Could anyone point me in the right direction? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • With the help of the Template Hierarchy article, determine what Template is displaying your category archives. If you were using the WordPress Default Theme, that would be wp-content/themes/default/archives.php. Then just before The Loop put a revised query_posts() statement.

    So in wp-content/themes/default/archives.php change this:

    <?php while (have_posts()) : the_post(); ?>

    to this:

    <?php query_posts($query_string . '&orderby=title&order=ASC'); ?>
    <?php while (have_posts()) : the_post(); ?>

    Note: this will change the order for all queries that utilize the archive.php template.

    Thread Starter veenublue

    (@veenublue)

    You sir need a raise. Thank you again!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Archive by alpha order?’ is closed to new replies.