Title: Column Filter Widget
Last modified: August 22, 2016

---

# Column Filter Widget

 *  Resolved [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/column-filter-widget-1/)
 * First let me thank you very much for such a wonderful plugin, it is incredibly
   useful. 2nd I wanted to ask you the following:
 * 1) I am using the ColumnFilterWidget and would like to stack all of them one 
   on top of the other so that each drop down is on its own line. I know that you
   mentioned a few months ago that that might not be possible, but I wanted to see
   if it was at this time.
 * 2) Is there a way to add a reset button so that it will reset all of the filters?
 * 3) We have several columns say titled “Column 1”, “Column 2”, “Column 3” and 
   we would like to hide Columns 1 and 2, but still have the drop down filter appear
   at the top so that we can just have “Column 3” pare down to a few final options
   once the drop down options are selected. However, if I hide columns 1 and 2, 
   then their drop down filters disappear as well. Is there a way to have the dropdowns
   visible while the columns remain invisible?
 * 4) Lastly, is there a way to hide one of the dropdowns? (Column 3, since that
   is the end product and we dont want people to search using that option).
 * Thank you very much in advance for your help.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783393)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * 1) Sorry, I’m not aware of a solution here. I can only suggest to play around
   with the CSS for this, e.g. in the Developer Tools of your browser.
 * 2) I’ve also not seen something for that before. You’ll likely need additional
   JavaScript code. As I’m not the developer of the ColumnFilterWidgets JS code (
   I only make it available as a TablePress Extension), I don’t know how that would
   have to look like however.
 * 3) This depends on how you hide the columns. If you hide them via “Custom CSS”,
   e.g.
 *     ```
       .tablepress-id-123 .column-1,
       .tablepress-id-123 .column-2 {
         display: none;
       }
       ```
   
 * you should get the dropdowns.
 * 4) For this, you can use the `datatables_columnfilterwidgets_exclude_columns`
   Shortcode parameter that is mentioned on [http://tablepress.org/extensions/datatables-columnfilterwidgets/](http://tablepress.org/extensions/datatables-columnfilterwidgets/)
 * Regards,
    Tobias
 *  Thread Starter [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783504)
 * Thank you so much for your assistance. I followed the instructions, and though
   your solutions do hide all of the columns as expected, and show all of the appropriate
   drop down menus, it is no longer allowing me to use the drop downs to filter 
   anything out. I select the options, but the table list remains the same.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783510)
 * Hi,
 * that sounds strange. 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 [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783512)
 * Thanks for your help. You can see it here: [Table Page](http://curadelresvetimaging.com/home/lab-flare-products-for-research/research-product-finder/)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783513)
 * Hi,
 * thanks for the link!
    I assume that this is caused by some invalid JavaScript
   code on the page. In the footer, I see this:
 *     ```
       add_filter( 'login_url', 'my_login_url' );
       2
       function my_login_url( $url ) {
       3
           $redirect_to = '?redirect_to=' . get_permalink();
       4
           return 'http://curadelresvetimaging.com/home/user-profile/' . $redirect_to;
       5
       }
       ```
   
 * This is however PHP code and not JavaScript code. Please remove that from the
   page footer.
 * Regards,
    Tobias
 *  Thread Starter [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783514)
 * Thanks for responding. I removed that code, but the error still remains.
 *  Thread Starter [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783515)
 * On one additional note, if i have all of the columns shown, then it does in fact
   filter correctly using the drop down menus.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783516)
 * Hi,
 * ok, then let’s try a different way of hiding the column. Please remove the “Custom
   CSS” for the hiding of the columns again, and instead add this to the “Custom
   Commands” textfield on the “Edit” screen:
 *     ```
       "columnDefs": [ { "visible": false, "targets": [ 0, 1, 2, 3 ] } ]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783517)
 * Thank you for responding again. I made that change, still no dice. Could it be
   that the columns have to be showing for the filtering to work?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783519)
 * Hi,
 * ah, found it 🙂 The “Search/Filter” checkbox must be enabled for the table, otherwise
   this will not work. So, please enable that. You can then hide the search field
   with some “Custom CSS”:
 *     ```
       #tablepress-4_filter {
         display: none;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [xarcadia](https://wordpress.org/support/users/xarcadia/)
 * (@xarcadia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783528)
 * Thanks so very much! I appreciate your help!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783531)
 * 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](https://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘Column Filter Widget’ 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/)

 * 12 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/column-filter-widget-1/#post-5783531)
 * Status: resolved