Forums

Alphabetize By Post Title (2 posts)

  1. antiquemommy
    Member
    Posted 3 years ago #

    I would love to have the option of sorting my posts by title alphabetically. I've moved from Blogger to TypePad and finally to WP (where I plan to stay!) and have done a lot of importing and so my archives are a mess. And also, it would be nice to be able to converge comments, so that comments on a given post from blogger from four years ago would join up with the newer comments on the same post after it was imported into WP. I know. I'm a neat freak. It's a lot to ask.

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Using the WordPress Default Theme, changed wp-content/themes/default/index.php to list posts alpha by title.

    Change:

    <?php if (have_posts()) : ?>

    to this:

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

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy
    Template Tags query_posts()

Topic Closed

This topic has been closed to new replies.

About this Topic