Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi SFGolfer,

    It’s a DataTables JavaScript feature. You could add a parameter from DataTables to make it happen.

    For your question, please edit the table in TablePress of your WordPress. Then scroll to “DataTables JavaScript Library features” section below the table and add the following custom command to “Custom Command” area:

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0,2 ] } ]

    Just remember to change the number in it. As 0,2 means to make the columns of 1st and 3rd not sortable. If you want only the first column not sortable, please change 0,2 to 0, etc.

    Please let me know if you need further help on this.

    Regards,
    Haoxian

    Thread Starter SFGolfer

    (@sfgolfer)

    Awesome! That worked like a charm.

    Thanks!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question. Yes, that’s the correct command to achieve this. Thanks, Haoxian!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prevent one or more columns to sort’ is closed to new replies.