Support » Plugin: TablePress » Sorting column with text and number

  • Resolved Harsh

    (@harshsoni_w3)


    Hi Tobias,

    Thanks for the great plugin!

    I have a column that has text and numbers both in it.
    And it Looks like this:

    114,000
    63 Stores
    unknown
    8,000,000
    8 Locations
    125 GB

    currently i am unable to sort this column as i wanted it to be like this

    8 Locations
    63 Stores
    125 GB
    114,000
    8,000,000
    unknown

    i want to know how can i achieve this or is it possible to sort these kind of column values in this way..?

    any suggestions ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Such columns will be sorted as text by default, simply as the sorting algorithm doesn’t know what yo use otherwise.

    To achieve the sorting that you describe, you could add a hidden column that contains the numbers that should be used for sorting and then apply the approach from https://wordpress.org/support/topic/sorting-table-by-image/?replies=14

    Regards,
    Tobias

    Harsh

    (@harshsoni_w3)

    thanks for your valuable suggestion and quick support

    it worked for me..

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sorting column with text and number’ is closed to new replies.