WordPress.org

Forums

WP-Table Reloaded
[resolved] Row randomisation (7 posts)

  1. JackieFRCUK
    Member
    Posted 2 years ago #

    Hi Tobias
    I've followed your closed topic on how to achieve row randomisation. I've created an extension file and saved to plug-ins/activated but my table is still staying in the same order. Have I missed something - do I need to add something to the code on the page or am I not specifying my table ID correctly (it's all I can think of). Code snippet is as follows and I've changed last bit to table ID=1 with and without a slash:

    function wp_table_reloaded_shuffle_table( $table, $orig_table, $output_options ) {
    $list_of_random_tables = array( 2, 4, 5 ); // table IDs

    Any help would be much appreciated.

    Thanks.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    for this to work, you will need to uncheck the "Cache Table Output" checkbox on the "Edit" screen of your table. Caching doesn't make sense if you want random order on each visit, obviously.
    (This is a feature that didn't exist, when that code was developed, that's why it is not mentioned in that forums thread.)

    Regards,
    Tobias

  3. JackieFRCUK
    Member
    Posted 2 years ago #

    Hi Tobias

    Thanks for the quick response. Box is unticked and saved but I still haven't got randomisation. Is there anything else you can think of?

    Thanks
    Jackie

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Jackie,

    hhm, weird. Can you explain, what you mean with

    I've changed last bit to table ID=1 with and without a slash:

    You should just have to change

    2, 4, 5

    to

    1

    (if that is the table you want randomized).

    Regards,
    Tobias

  5. JackieFRCUK
    Member
    Posted 2 years ago #

    ah this is it, was adding the 1 in the wrong place, thanks Tobias. Much appreciated.

  6. JackieFRCUK
    Member
    Posted 2 years ago #

    resolved, thanks again.

  7. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    awesome! Great that you found it :-)
    Thanks for the confirmation, that this worked!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Table Reloaded
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic