View Single Post
Old 08-08-2012, 08:47 AM  
The Dawg
Confirmed User
 
The Dawg's Avatar
 
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
Quote:
Originally Posted by fris View Post
maybe something along these lines

Code:
session_start();

add_filter('posts_orderby', 'edit_posts_orderby');

function edit_posts_orderby($orderby_statement) {

    $seed = $_SESSION['seed'];
    if (empty($seed)) {
      $seed = rand();
      $_SESSION['seed'] = $seed;
    }

    $orderby_statement = 'RAND('.$seed.')';
    return $orderby_statement;
}
I found this post also.

I added it to the functions file and it works - but, it affects everything including the listings in the admin area.

Quote:
Originally Posted by fris View Post
Where would I stick this code?

Last edited by The Dawg; 08-08-2012 at 08:49 AM..
The Dawg is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote