[resolved] How to randomize post order (4 posts)

  1. Benjamin_SP
    Posted 7 years ago #

    Hi everyone,

    Right now, My posts are ordered according to their publish date (the latest posts appearing at the top and the earlier ones at the bottom). I really want the posts to appear randomly, with each page refresh the order of the posts in the archives should be different. Can this be done?

    Many thanks.

  2. Clayton James
    Posted 7 years ago #

  3. esmi
    Forum Moderator
    Posted 7 years ago #

    <?php query_posts('orderby=rand');?> ?


  4. Benjamin_SP
    Posted 7 years ago #

    Thank you very much to both of you. This snippet did it:

    <?php query_posts('orderby=rand');?>

Topic Closed

This topic has been closed to new replies.

About this Topic