WordPress.org

Ready to get started?Download WordPress

Forums

Problem order post (6 posts)

  1. max299
    Member
    Posted 6 years ago #

    Hello I use wordpress 2.5.1 with a theme.
    My problem is: I view as first older post and latest post go to behind.

    I read that is a mysql 5.0.51 bug, but my provider can't upgrade their database.

    Can I change wordpress code to solve this problem, I don't know what procede.

    sorry for my english
    thanks

  2. richarduk
    Member
    Posted 6 years ago #

    <?php query_posts('order=DESC') ?> will show the posts with the most recent posts at the top.

    <?php query_posts('order=ASC') ?> will show the posts with the oldest post at the top.

    Place the code before The Loop i.e. before <?php if (have_posts()) : ?>

    Is that what you're looking for?

  3. max299
    Member
    Posted 6 years ago #

    sorry :(
    in which file I change this value?

  4. max299
    Member
    Posted 6 years ago #

    I try to change this value but I read that this is a mysql 5.0.50 bug

  5. richarduk
    Member
    Posted 6 years ago #

    If you're talking about index page, then index.php

    If the problem is with a category page, then category.php

    Sorry I can't help any more, but a link to the site or using the pastebin might make it clearer

  6. Ivovic
    Member
    Posted 6 years ago #

    yeah, there is a bug with certain versions of mysql which results in reversed behaviour when setting the sort order.

Topic Closed

This topic has been closed to new replies.

About this Topic