Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter corpcasting

    (@corpcasting)

    Sorry. Link – https://30a.com/deals

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    have you installed the Extension from https://tablepress.org/extensions/table-row-order/ that is necessary for this?

    Regards,
    Tobias

    Thread Starter corpcasting

    (@corpcasting)

    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

    (@tobiasbg)

    Hi,

    no probem ??

    Best wishes,
    Tobias

    Thread Starter corpcasting

    (@corpcasting)

    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

    (@tobiasbg)

    Hi,

    I’m confused. When I sort the first column on https://30a.com/deals it sorts on the link text just fine…

    Regards,
    Tobias

    Thread Starter corpcasting

    (@corpcasting)

    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

    (@tobiasbg)

    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

    (@corpcasting)

    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=https:// …. 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

    (@tobiasbg)

    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

    (@corpcasting)

    Perfect. Row order parameters removed, plugin deactivated, and CSS updated. Thanks SO much!!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    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.