All, Working with a group of businesses who never want

Hello All,
Working with a group of businesses who never want to be last.
I've been asked to rotate the listings/posts.
They are in category archives.
The randomizer plugin did not work.
Is there a way to override the asc/desc order and make all posts on the site rotate in a random order?

Thanks for the help.

  • PC
    • WPMU DEV Initiate

    Hey there Richard,

    If you want to randomize posts order on your homepage, you must edit your index.php theme file.

    Search for:

    if (have_posts()) :
    And replace it with:

    query_posts('orderby=rand');
    if (have_posts()) :

    You might also want to randomize posts in your category archives. If that’s the case, you must edit your archive.php file (the steps are the same as above).

    Can you kindly try and see if that works ?

    Cheers, PC

  • Richard
    • The Incredible Code Injector

    Thanks PC!
    That did work for the posts.
    I was hoping it would work for the slider too but it di not.
    I will look at the slider code and see what I can find.
    Hopefully I can find something.

    Also on a side note, I used to be able to link right into
    this site from my email without logging in again.
    Now I always have to log in even if I am logged in in my sites.
    Go figure.

    You are much appreciated.

  • PC
    • WPMU DEV Initiate

    Hey Richard,

    Glad it worked fine for the posts.

    Also on a side note, I used to be able to link right into
    this site from my email without logging in again.
    Now I always have to log in even if I am logged in in my sites.
    Go figure.

    So you mean to say while posting on the forums ? If yes, then the forums need a separate login from the Dashboard in sites.

    If you want to reply using your phone, you should be logged in to https://premium.wpmudev.org

    Cheers, PC

  • Richard
    • The Incredible Code Injector

    @PC
    I just noticed that my posts are random, but are repeating as well.
    I have four or five posts, but they just keep repeating down the page. I don't know how far down they go, but they go a ways.

    Did I break my archive loop?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.