WordPress.org

Support

Support » Plugins and Hacks » [Resolved] display posts in order other than when they were posted

[Resolved] display posts in order other than when they were posted

  • Hello,

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The template tag, query_posts(), placed just before your loop should work.

    query_posts($query_string.'orderby=title&order=ASC');

    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?

    Thanks

    I figured it out <8o)

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

    Thanks for the help

    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?

    Ahh… didnt have ampersand at the start:

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] display posts in order other than when they were posted’ is closed to new replies.