Title: Sorting column should not sort on URL code
Last modified: August 21, 2016

---

# Sorting column should not sort on URL code

 *  Resolved [Paul Westerbeek](https://wordpress.org/support/users/paul-westerbeek/)
 * (@paul-westerbeek)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/sorting-column-should-not-sort-on-url-code/)
 * Hi everyone,
 * after setting up my table presenting several different projects, I found out 
   that the sorting functionality does not do what I want it to do. In my table 
   the first column only contains the project number. All project numbers are numbered
   in the same fashion (i.e. PR-2013-00.05-001 to …-029). In some cells there’s 
   an embedded link, whereby clicking on the project number takes you to the project
   page. Half of the projects don’t have a separate page, so here the cell contains
   just the project number.
 * Now for my problem: When I sort on the first column, the project codes are no
   longer in the order I want them to be in: -001 to -029. TablePress orders them
   neatly in alphabetical order, but also takes the URL code into account, resulting
   in the project numbers **with** embedded link before the project numbers **without**
   a link. The code in these cells obviously starts with ‘a href=…’ which make it
   appear before the project codes that do not contain an embedded URL and start
   with ‘PR-2013-…’.
 * It’s not really a problem at the moment, since the table is near 30 rows long,
   but as it grows larger, it may become more of a nuisance.
 * Is there a way to make the plugin neglect the URL code (or anything between <…
   > for that matter, cause I expect **bold** or _italic_ to give the same problem)
   and just take the cell contents that are shown in the actual table into account?
 * Many thanks,
 * Paul
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/sorting-column-should-not-sort-on-url-code/#post-3871319)
 * Hi Paul,
 * thanks for your question, and sorry for the late answer. As I was on vacation,
   I didn’t have a chance to reply earlier.
 * Actually, the sorting should recognize HTML code and just sort on the inner content
   of that. It might be possible, that the automatic detection is not working.
    
   To find out more, could you please post a link to the page with the table? Thanks!
 * Regards,
    Tobias
 *  Thread Starter [Paul Westerbeek](https://wordpress.org/support/users/paul-westerbeek/)
 * (@paul-westerbeek)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/sorting-column-should-not-sort-on-url-code/#post-3871321)
 * Hi Tobias,
 * no problem. Thanks for taking the time to reply.
 * When I tried to replicate the bug this morning, somehow I wasn’t able to. Everything
   seems to work fine just the way you described how the plugin should function.
 * I have no clue what went wrong the first time, but I guess this bug is resolved,
   so I’ll mark it as resolved.
 * Thanks again!
 * Paul
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/sorting-column-should-not-sort-on-url-code/#post-3871322)
 * Hi Paul,
 * very nice! That’s great to hear! 🙂
    Might have been just a temporary glitch 
   then.
 * Best wishes,
    Tobias

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

The topic ‘Sorting column should not sort on URL code’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/sorting-column-should-not-sort-on-url-code/#post-3871322)
 * Status: resolved