WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded - Custom Sorting (3 posts)

  1. lakerfan
    Member
    Posted 2 years ago #

    Hi,

    I'm new here and I was wondering how to sort a column with my own custom sorting. For example, one of my columns in the table is Greek Class Column (Alpha, Beta, Gamma, etc as entries.). When the user clicks sort by class, it should sort the column according to the greek alphabet and not to the English alphabet. Alpha Beta Gamma Delta instead of Alpha Beta Delta Gamma. Is there a way to have my own custom sort?

    I also put in a hidden column with the class order and associated each class with an integer value but don't know where to go from there. I've searched a lot but can't seem to find it.

    Any help would be appreciated. Thanks!

  2. lakerfan
    Member
    Posted 2 years ago #

    Bump. Please help

  3. TobiasBg
    Member
    Posted 1 year ago #

    Hi,

    sorry for the late answer. Unfortunately, I just found this thread as it wasn't tagged properly. Maybe my answer will help people searching for this issue...

    Yes, such custom sorting is possible, but it will need to be implemented with some extra JavaScript code and by using the DataTables JavaScript library's API. That's the library that WP-Table Reloaded uses for sorting.
    I suggest to take a look at the documentation and examples at http://www.datatables.net.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Topic