WordPress.org

Forums

TablePress
[resolved] Disable Sorting in a Column (2 posts)

  1. epretorious
    Member
    Posted 1 year ago #

    Is there some way to disable sorting for an entire column (e.g., hiding the sort icon)?

    TIA,
    Eric P.

    https://wordpress.org/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Eric,

    thanks for your question, and sorry for the trouble.

    For that, please try adding this into the "Custom Commands" textfield on the "Edit" screen of the table:

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

    This turns off sorting for the third and fourth column (counting starts with 0 in the code).

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic