Title: WordPress Column Filtering
Last modified: August 24, 2016

---

# WordPress Column Filtering

 *  Resolved [nrahley](https://wordpress.org/support/users/nrahley/)
 * (@nrahley)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wordpress-column-filtering/)
 * Hello,
 * I love this plugin, but I am having a few problems with the column filtering.
   Some of the dropdown filters are working, and some are not. Do you have any idea
   why this happens when I choose a college partner nothing shows up? It is also
   doing that on the Program dropdown. Some show up and some do not. Here is a link
   to my table: [http://hired.center/education/degree-programs/](http://hired.center/education/degree-programs/)
 * Also, is there a way to display the dropdown filters on one line. Sometimes they
   are on one line and other times it is showing two lines.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wordpress-column-filtering/#post-6170644)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * The problem in the “Partner University” column is that it contains HTML code.
   As that HTML code contains quotation marks `"`, the ColumnFilterWidgets JavaScript
   code is thrown off, unfortunately.
    The workaround here would be to add another
   column that only has the partner names (without the link), but that is hidden
   to the visitor. We can then instruct the ColumnFilterWidgets JS to use that column
   for the filtering, instead of the column with the links. For example, add that
   new column as the 5th column. Then, add this to the “Custom Commands” textfield
   on the “Edit” screen to hide it from the visitor:
 *     ```
       "columnDefs": [ { "visible": false, "targets": [ 4 ] } ]
       ```
   
 * (the 4 in this code means 5th column, as counting starts with 0).
 * Also, change your Shortcode to
 *     ```
       [table id=1 datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns="4" /]
       ```
   
 * to hide the not working drowdown. (The 4 in this code does mean 4th drop-down,
   as counting in this Shortcode starts with 1.)
 * Then, the problem in some cells (e.g. in the first column) is that the contain
   empty lines at the end. This is the reason why in the first drop down, some entries
   like “Bachelor Degree” appear multiple times. You must remove all line breaks
   after that text in those cells (this is for example in rows 7, 9, 13, etc., which
   all have 4 line breaks).
 * Finally, the long widths of the drop downs is caused by the amount of content
   in their respective cells. To limit the width, you could add this to the “Custom
   CSS” textarea on “Plugin Options” screen of TablePress:
 *     ```
       #tablepress-1_wrapper .column-filter-widget select {
         max-width: 200px;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [nrahley](https://wordpress.org/support/users/nrahley/)
 * (@nrahley)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wordpress-column-filtering/#post-6170671)
 * It worked perfectly. Thank you so much!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wordpress-column-filtering/#post-6170679)
 * 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](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘WordPress Column Filtering’ 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: [10 years, 11 months ago](https://wordpress.org/support/topic/wordpress-column-filtering/#post-6170679)
 * Status: resolved