• Resolved creativelifeform

    (@creativelifeform)


    Hi all,

    just a quick question. I have two posts within a category and need to order them via ID. I need the earlier post to appear before the later one. At the moment my code looks like this:

    <?php $my_query = new WP_Query('category_name=Practices&showposts=2&orderby=ID'); ?>

    But its not really working out how I want…the IDs for the each post are 19 and 16 respectively, and the 19th post is sitting above the 16th. I need it to be the other way around.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘The Loop and orderby=ID’ is closed to new replies.