[resolved] display posts in order other than when they were posted (6 posts)

  1. Mark Steggles
    Posted 7 years ago #


    wordpress 2.7

    Hard question- I have a website that is running wordpress in the route public/html. The website is a list of events... where each post is an event so that people can comment on the event.

    By default... wordpress shows posts by most recently posted.

    I want my wordpress to show posts in order of their event date rather than when I posted them in wordpress. I could give them titles in this format 2009-01-20-EVENTNAME

    Is this possible?

    Any help appreciated

  2. MichaelH
    Posted 7 years ago #

    The template tag, query_posts(), placed just before your loop should work.

  3. Mark Steggles
    Posted 7 years ago #

    Hello, this should do the trick, thanks.

    Can you help me implement it:

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

    is that right?


  4. Mark Steggles
    Posted 7 years ago #

    I figured it out <8o)

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

    Thanks for the help

  5. Mark Steggles
    Posted 7 years ago #

    Adding order by title to the loop:

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

    this breaks the search feature and the categories links on my blog. I have tried different templates but no good. Am I using the order by title query_posts($query_string.'orderby=title&order=ASC'); correctly?

  6. Mark Steggles
    Posted 7 years ago #

    Ahh... didnt have ampersand at the start:

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

Topic Closed

This topic has been closed to new replies.

About this Topic