Support » Plugin: TablePress » display sorting already pre-sorted

  • Resolved mayte_eme


    i installed tablepress plus these 2 extensions:
    1. tablepress-datatables-sorting-plugins
    2. tablepress-table-row-order

    I have a table with 2 columns (A and B). Column A has names and column B has numbers that go from 0 to 999,999,999 (e.g. 1,256,145 or 256,254 or 456). i was to sort by column B by descending order.

    with ” tablepress-datatables-sorting-plugins” extension i can enable sort ni the edit page and add this line for users to sort themselves: "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ]

    it works but i really want to display the table in the page already sorted without users having to sort themselves. i installed “tablepress-table-row-order” extension and use [table id=1 row_order="sort" row_order_sort_column="B" row_order_sort_direction="DESC" /] in the actual page but no luck .. any help will be greatly appreciate it.


Viewing 2 replies - 1 through 2 (of 2 total)
  • never mind.

    guess got too confused and couldn’t see it. i removed “tablepress-table-row-order” plugin. using shortcode[table id=1] to display the page and in tablepress edit page, using "aaSorting": [[ 1, "desc" ]] . that did it 🙂

    Plugin Author TobiasBg



    thanks for your post, and sorry for the trouble.

    Great find! Yes, the problem here is that the Row Order Extension can only work on real numeric data. As your cells contain a thousand separator in the numbers (the comma), this doesn’t work. You’ll need to use the JS-only approach with those “Custom Commands” that you have already found 🙂

    Best wishes,

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘display sorting already pre-sorted’ is closed to new replies.