Title: Sort table via dropdown
Last modified: August 31, 2016

---

# Sort table via dropdown

 *  Resolved [Wirebird Media](https://wordpress.org/support/users/sssv/)
 * (@sssv)
 * [10 years ago](https://wordpress.org/support/topic/sort-table-via-dropdown/)
 * Tobias – do you think it would be possible to create a dropdown menu for a Tablepress
   table? My client wants to sort by an actual dropdown, instead of just using a
   column sort.
 * Do you think I could do this with List.js? Do you have another approach that 
   you’d suggest? Could I add category tags to each row in the table?
 * Thanks!
    Sara
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349344)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * I’m not aware of an existing solution for sorting via dropdown, so trying an 
   external JS script could be a possibility.
    Your best chance would then be to
   let TablePress print only the HTML code, so that you can manually add any JS 
   code that you want.
 * Regards,
    Tobias
 *  Thread Starter [Wirebird Media](https://wordpress.org/support/users/sssv/)
 * (@sssv)
 * [10 years ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349373)
 * Thanks Tobias! I actually found a creative work around using the row filter extension
   and a dropdown with conditional logic programmed in Gravity forms. 🙂
 * I’ll ask the client to make a donation. Thank you so much for all you do!!!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349377)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
    And thanks
   for wanting to donate, I really appreciate it!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  Thread Starter [Wirebird Media](https://wordpress.org/support/users/sssv/)
 * (@sssv)
 * [10 years ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349396)
 * Tobias,
 * So I got this to work and it’s actually pretty slick (not live yet to share a
   link though).
 * The only problem is this:
 * This works to align the search to the left but it jumps to the right when filtered.
   #
   tablepress-18_filter { float: left; }
 * I tried the following CSS but it didn’t work. I can’t seem to find the correct
   ID in the inspector…
    #tablepress-18 #dataTables_filter { float: left; }
 * Any suggestions?
 * Thanks!
    Sara
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349397)
 * Hi Sara,
 * please try
 *     ```
       #tablepress-18_filter {
         float: left !important;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Wirebird Media](https://wordpress.org/support/users/sssv/)
 * (@sssv)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349409)
 * Tobias,
 * Unfortunately that code didn’t work, nor did several other things I tried…
 * The page is live though now if you want to look at it. Maybe you can see something
   I haven’t been able to. 🙂 [https://www.iraservicestrust.com/forms](https://www.iraservicestrust.com/forms)
 * Thanks!
    Sara
 *  Thread Starter [Wirebird Media](https://wordpress.org/support/users/sssv/)
 * (@sssv)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349410)
 * Tobias, this has been solved!!
 * .dataTables_filter {
    float: left !important; }
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349411)
 * Hi,
 * very nice! Yes, this is the correct version of the code if you want to apply 
   this to all tables. Good to hear that you found this!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘Sort table via dropdown’ 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/)

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)
 * [tag](https://wordpress.org/support/topic-tag/tag/)

 * 8 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/sort-table-via-dropdown/#post-7349411)
 * Status: resolved