Sorting Numbers from Shortcode | WordPress.org

[ad_1]

Hi,

thanks for your post, and sorry for the trouble.

Here, it would indeed be a possibility to sort the table upon loading of the page by the visitor. From what I can see from the screenshots, all that should be needed is to add this to the “Custom Commands” text field in the “Table Features for Site Visitors” section on the table’s “Edit” screen:

"order": [ [ 1, "desc" ] ]

Here, the 1 indicates that the second column should be sorted (counting the columns starts with 0 for the first column, in this JavaScript code).

(The Counter Column module should then work nicely here as well, it will automatically create that 1, 2, 3, etc. ranking.)

I hope this helps 🙂

Best wishes,
Tobias

Thread Starter
potez

(@potez)

Thank you so much for replying! That worked for me! I tried something very similar to that before, but maybe I needed to keep the sorting checkbox checked for it to work because I did not have it checked earlier when I was adding custom commands. But whatever the reason, it is working amazingly now and I will just test it for a couple days but I think this is going to be a huge timesaver for us. I really appreciate the quick reply!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer