• Resolved ajeanb3

    (@ajeanb3)


    Is there a way to restrict sorting to only one specific column in the table? We currently have three columns and only want the sorting option for the third column labeled “Year(s)”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    Yes, this is possible! Essentially, you’ll have to pass a small piece of configuration code to the JavaScript library that TablePress uses for the sorting of the table on the frontend.

    This is is possible by adding a “Custom Command” to the respective input field on the table’s “Edit” screen, in particular a command that sets the orderable flag on the columns, see the JavaScript library’s documentation at https://datatables.net/reference/option/columns.orderable.

    For more detailed help and a specific solution for your site and table, please consider the direct email support option. Thanks for your understanding!

    Best wishes,
    Tobias

    Thread Starter ajeanb3

    (@ajeanb3)

    That worked perfectly! Thank you!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.