Title: DataTables ColumnFilterWidgets
Last modified: August 22, 2016

---

# DataTables ColumnFilterWidgets

 *  Resolved [click2](https://wordpress.org/support/users/click2/)
 * (@click2)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/)
 * Hi there,
 * Quick question : is there any possibility, to set up a column filter for a particular
   column, to hide this column in table press, but still have the filter displayed
   on the webpage ?
 * At the moment, the filter disappears as soon as I hide the column.
 * For example, I have a table with :
    Fruits / Price / Origin / Quality.
 * I would like my user to be able to filter per quality : good / avg / poor, but
   not the column quality to be shown in the table.
 * All the best and thanks for the great plugin.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/#post-5695903)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Yes, this should be possible, but you will have to hide the column in a different
   way. Instead of doing that on the “Edit” screen, you’ll have to do it with a “
   Custom Command” for the DataTables JS library (there’s a textfield for this on
   the “Edit” screen), like
 *     ```
       "columnDefs": [ { "visible": false, "targets": 4 } ]
       ```
   
 * The 4 indicates that the 5th column shall be hidden, as counting starts with 
   0.
 * Regards,
    Tobias
 *  Thread Starter [click2](https://wordpress.org/support/users/click2/)
 * (@click2)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/#post-5695921)
 * Hi Tobias,
 * This worked perfect. Many thanks.
 * However, because the column widget plugin has to show all filter, then hide them
   by exclusion, it makes automatically the width of all column go to their maximum
   so that the filtering box can show every string. Regardless of the css classes
   I created.
 * Any work around you thought about ?
    Would be fantastic.
 * All the best.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/#post-5695926)
 * Hi,
 * I’m not really sure that I understand. Can you please post a link to the page
   with the table where this problem happens, so that I can take a direct look? 
   Thanks!
 * Regards,
    Tobias
 *  Thread Starter [click2](https://wordpress.org/support/users/click2/)
 * (@click2)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/#post-5695927)
 * Hey Tobias,
 * I could solve it !
    Many thanks still for your help and the cool plugin !
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/#post-5695929)
 * Hi,
 * awesome, that’s great to hear!
 * 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 5 replies - 1 through 5 (of 5 total)

The topic ‘DataTables ColumnFilterWidgets’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/datatables-columnfilterwidgets-1/#post-5695929)
 * Status: resolved