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.

    You are right. The DataTables JavaScript library does recognize that there’s HTML code in the cell, and then just sorts with the link text. However, it treats that as a string and not a number. That leads to to result that you are seeing.
    To fix this, please install and activate the TablePress Extension from https://tablepress.org/extensions/datatables-numhtml/
    After that, add this to the “Custom Commands” text field in the “Features of the DataTables JavaScript library” section on the “Edit” screen of the table from https://smoothiemakershq.com/compare-smoothie-makers/ :

    "aoColumnDefs": [ { "sType": "num-html", "aTargets": [ 2 ] } ]

    This will fix the data type for the third column of the table (there’s a 2 in the code, because counting starts with 0).

    Regards,
    Tobias

    Thread Starter sedohr7682

    (@sedohr7682)

    Perfect! Thanks Tobias…..

    Just FYI… wanted to give a small token of appreciation (in between jobs right now but your plugin/support is AWESOME!)but can’t send gift card w/o and email addy.

    Could not find it anywhere on your donate or amazon wishlist (US) page. ;o(

    Didn’t want to donate via PP and have them remove fees.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    great to hear that this solved it ??

    And thanks for wanting to donate, I really appreciate it! ??
    For that gift card, please send me an email to the address that you can see on https://tablepress.org/imprint/ I will then send you the email address that I prefer for Amazon (because it is a different one). Thanks!

    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 ‘Sorting html link text’ is closed to new replies.