Hi Brian,
thanks for your question.
Unfortunately, I’m not aware of an existing random sort solution. It could probably be done with a custom sorting algorithm that extends the DataTables JavaScript library (which does the sorting), but I don’t know how that would have to look like 🙁
Regards,
Tobias
Thanks Tobias for coming back so quickly – yes, I realise that “random” is not part of wp-table reloaded but I just thought I’d ask. I’m building a site for holiday homes in Ireland and owners like to see their home at top of listings occassionaly. With alphabetical sort, the middle ones stay in the middle.
Thanks again
Brian
Hi Brian,
ha, funny, I just remembered that I had developed some code to bring a table into random order (whenever the page is loaded, so this does not even need to change the sorting) a year ago, thanks to another post here in the forums.
You can find everything here:
http://wordpress.org/support/topic/plugin-wp-table-reloaded-random-row-option
Just make sure that you use last chunk of code that I posted in that thread, as the first one contains a bug (which you will however notice if you read the entire thread).
Additionally (this was not yet necessary when the thread was created a year ago), please disable the “Cache Table Output” checkbox on the “Edit” screen of the table, as this will not work otherwise.
Regards,
Tobias
Hello Tobias
Thanks for this – I’ll try it this evening and let you know how I get on
Brian
Hi Tobias
Works great – table now appears in random order on load. That should keep advertisers happy. Have made a donation via PayPal
Keep up the good work
Brian
Hi Brian,
very cool! 🙂 Nice that this worked!
And thank you very much for your donation, that’s really nice of you!
Best wishes,
Tobias