Latest Post Last, php wordpress problem

Discussion in 'PHP' started by strgraphics, May 7, 2011.

  1. #1
    Hello mates,

    Can any body help me out of this..,

    Actually if you write any post in wordpress, it will appears at latest(first post) in our home page right..!!!!

    In my home page am using...

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    PHP:
    But i want to display my latest post as last post.., i mean latest post after the first post, hope you got my point.
    exactly....__ Displaying oldest post on top,

    Would be greateful to your help.
     
    strgraphics, May 7, 2011 IP
  2. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #2
    check this page
    http://codex.wordpress.org/Function_Reference/WP_Query
    Code (markup):
    use Order & Orderby Parameters
     
    bhuthecoder, May 7, 2011 IP
  3. strgraphics

    strgraphics Active Member

    Messages:
    710
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Yes...,

    its worked..!!!!!
    Thank you so much bhuthecoder.
     
    strgraphics, May 7, 2011 IP