The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] [Plugin: WP-Table Reloaded] WP Table Reloaded sorting links (5 posts)

  1. kgagne
    Posted 6 years ago #


    Fantastic plugin! My data have never been better organized.

    I have two tables that aren't sorting as I would expect. When clicking the "Format" column here:


    or "Medium" here:


    The results are not alphabetical. Is the plugin sorting by the contents of the cell (including HTML hyperlink), as opposed to what's actually being displayed?


  2. TobiasBg
    Posted 6 years ago #


    you should be able to fix that on those tables, by telling DataTables, that those two columns contain HTML. Then, the script will sort on the text of the link and not the actual HTML.
    To achieve that, you will need to add a command to the "Custom Commands" textfield in the "DataTables JavaScript Features" section on the "Edit" screen of those two tables.

    For the downloads one, add this code:

    "aoColumns": [ null, null, null, null, { "sType": "html" }, null ]

    For gallery table, add this:

    "aoColumns": [ null, null, { "sType": "html" }, null, null ]

    Hope that helps :-)

    Best wishes,

  3. kgagne
    Posted 6 years ago #


    I wish all plugin authors were as timely and detailed with their help! Thanks so much. Since I don't know JavaScript, I doubt I could've figured this out on my own.

    With your suggestions as a basis, I think I can address this issue on other tables, should I encounter it in the future. I also changed the code for the aforementioned downloads table to this:

    "aoColumns": [ null, null, null, null, { "sType": "html" }, { "sType": "html" } ]

    You rock!


  4. TobiasBg
    Posted 6 years ago #

    Hi Ken,

    thanks for your nice words, I appreciate it! :-)

    And your change to the code is perfectly correct :-)

    Best wishes,

  5. misksh
    Posted 6 years ago #

    This worked great for me at my page.
    Thanks much!

Topic Closed

This topic has been closed to new replies.

About this Topic