Title: Sorting Issue
Last modified: August 20, 2016

---

# Sorting Issue

 *  Resolved [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/)
 * I’m trying to sort the table alphabetically by column A by default. I’m using
   this shortcode:
 * [table id=1 row_order=sort row_order_sort_column=A /]
 * No luck with that. Any ideas?
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492519)
 * Sorry. Link – [http://30a.com/deals](http://30a.com/deals)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492529)
 * Hi,
 * have you installed the Extension from [http://tablepress.org/extensions/table-row-order/](http://tablepress.org/extensions/table-row-order/)
   that is necessary for this?
 * Regards,
    Tobias
 *  Thread Starter [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492531)
 * Why would I do that?! Lol
 * Sorry. I read all through the FAQ and documentation and missed that somehow.
 * Resolved! Thanks!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492538)
 * Hi,
 * no probem 🙂
 * Best wishes,
    Tobias
 *  Thread Starter [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492706)
 * I have a new sorting issue. Now that I’ve added links to all items in column 
   A, it is using the URL info to sort. I don’t guess there’s any way around this
   is there?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492708)
 * Hi,
 * I’m confused. When I sort the first column on [http://30a.com/deals](http://30a.com/deals)
   it sorts on the link text just fine…
 * Regards,
    Tobias
 *  Thread Starter [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492709)
 * Hmmm.. You’re right. But you have to force it to sort to make it correct. On 
   initial load, it was sorting by column A alphabetically automatically. Now that
   I’ve entered in links for each one, it’s like it is taking the characters from
   the URL and using that in the inital sort…. That is, unless you manually click
   the arrows to force a new sort. Does that make sense?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492710)
 * Hi,
 * the initial order is the same that you have on the “Edit” screen, i.e. there’s
   no initial sort being done. You’ll have to reorder the rows on the “Edit” screen,
   if you want a different initial load, or you can add this to the “Custom Commands”
   textfield on the “Edit” screen, to have the JS perform an initial sort on the
   first column:
 *     ```
       "aaSorting": [[0,'asc']]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492711)
 * Hey Tobias,
 * I follow you… but the initial order we were just seeing is NOT the same as my
   edit screen. I can assure you.
 * I am using this shortcode: [table id=1 row_order=sort row_order_sort_column=A/]
 * After doing that, everything in column A sorted alphabetically on initial load.
 * Then, after entering in links for each entry, then all of the items sorted based
   off of that data. So since everything began with a href=http:// …. the very next
   character is how it sorted.
 * Nonetheless, your javascript did the trick. Thanks again for the fantastic support.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492712)
 * Hi,
 * ahhh, now I see… I had totally forgot your initial post in this thread. Sorry
   for the confusion. I guess I need to go to bed and sleep :-/ You are using the
   Row Order Extension. Then you are right. That does indeed only sort the entire
   string, and in that the first changes do appear in the URL. So, yes, this does
   not sort for the link text, and unfortunately there’s no way to change that 🙁
 * You should then indeed use the JavaScript code. And you can then actually remove
   the row order parameters from the Shortcode, as those are useless with the JS
   initial sorting. (And if you are not using the Row Order Extension on other tables,
   you could actually uninstall it.)
 * Oh, and I suggest that you extend this “Custom CSS”
 *     ```
       #main .tablepress thead .sorting {
       	padding-right: 20px;
       }
       ```
   
 * to
 *     ```
       #main .tablepress thead .sorting,
       #main .tablepress thead .sorting_asc,
       #main .tablepress thead .sorting_desc {
       	padding-right: 20px;
       }
       ```
   
 * to have the sorting arrows fit better.
 * Regards,
    Tobias
 *  Thread Starter [corpcasting](https://wordpress.org/support/users/corpcasting/)
 * (@corpcasting)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492714)
 * Perfect. Row order parameters removed, plugin deactivated, and CSS updated. Thanks
   SO much!!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492715)
 * Hi,
 * no problem! 🙂 Great to hear that this will do it!
 * Best wishes,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Sorting Issue’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/sorting-issue/#post-3492715)
 * Status: resolved