Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Do you mean sorting for two columns at the same time, or do you just want to sort for a single column? In that case, that Shortcode parameter will work fine — after you install and activate the necessary TablePress Extension from http://tablepress.org/extensions/table-row-order/

    Regards,
    Tobias

    Thread Starter jdcb92

    (@jdcb92)

    Thanks a lot for your quick answer. Sorry for not being clear enough, and now that I see the question I said it wrong. What I want to achieve is to sort first by a column X and then by a column Y.

    Taking this table:

    Country | Region
    ————————-
    Germany | Nürnberg
    Costa Rica | San José
    Germany | Berlin
    Germany | Hamburg
    Costa Rica | Cartago
    Costa Rica | Alajuela

    I’d like to first sort by Country and then by Region like this:

    Country | Region
    ————————
    Costa Rica | Alajuela
    Costa Rica | Cartago
    Costa Rica | San José
    Germany | Berlin
    Germany | Hamburg
    Germany | Nürnberg

    I tried by putting

    [table id=ID row_order=”sort” row_order_sort_column=”A” row_order_sort_column=”B” row_order_sort_direction=”ASC” /]

    But id didn’t work. I wasn’t really expecting it to, though, since I didn’t find any resource that told me how to achieve that, but I thought it was worth a shot. Is that possible?

    Thanks in advance

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the clarification.
    Unfortunately, this is not possible with the Extension. As mentioned in the thread that you linked to, only one column can be sorted for.

    I can therefore only suggest to do the sorting manually or in Excel to get the proper order when a user visits the site.

    Regards,
    Tobias

    Thread Starter jdcb92

    (@jdcb92)

    Thanks a lot for the answer!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! Sorry that I couldn’t provide a better solution.

    Best wishes,
    Tobias

    Thread Starter jdcb92

    (@jdcb92)

    Hi, I ordered manually as you said by alphabetic order and then I have the TablePress to sort it by a specific column.

    The automatic sort is done ok, but the alphabetic order I set doesn’t show and also some hidden rows I have are showing as well.

    Any insights?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    so, you set a new order on the “Edit” screen of the table, and you also used the “Hide” feature there to hide some rows?
    However, that’s not showing as expected on the page where the table is shown? Are you maybe still having the extra parameter in the Shortcode for the Row Order Extension? That would obviously have to be removed with this new solution.

    Regards,
    Tobias

    Thread Starter jdcb92

    (@jdcb92)

    Yeah, I still have it. I’m going to explain what I’m trying to do so maybe you can understand my issue better.

    I want to sort by 2 columns. First by region and then by name.

    I have the row order sorting set to region, so I just manually sorted by name hoping that the sorting was done in a way that the first rows of the original table are the first to appear in the sorted table, but I think I was wrong =( hahaha

    Nevertheless, the hiding of the rows was done in the edit screen, but they still appear. Something interesting is that other rows are actually hiding so I think the rows that are hiding are the ones that get placed in the same position of the ones chosen to be hidden before the sorting.

    I think I’ll better sort it using Excel and then import it again.

    Thanks a lot for your quick answer, by the way 😉

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the explanation, now I see 🙂 That won’t work like this, unfortunately, as the Row Order Extension can not know that you already manually sorted the table for a different column.
    And you are right, when the Extension is used, only the positions of the hidden rows are “kept”, so that they are applied to the sorted table (sorting happens before hiding).

    It will therefore indeed be better to get the sorting correct in Excel, and then import that table again.

    Regards,
    Tobias

    Thread Starter jdcb92

    (@jdcb92)

    Thanks a lot for your responsiveness, Tobias. I’m going to solve it that way.

    As feedback, I think those features (multiple sorting and hiding after sort or by a specific row and not the position) are very useful to implement.

    In spite of that, I love the plugin and your support. I already rated 5 stars and would donate but I’m still a poor student =(. When I graduate I’ll donate 😉

    Greetings from Costa Rica!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no worries, thanks for the great feedback! 🙂
    I really appreciate it!

    Good luck with your studies and have fun with TablePress!
    Tobias

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

The topic ‘Multi-column sort shortcode table row order’ is closed to new replies.