Title: Data Table Column Filter Widget rendering
Last modified: September 1, 2016

---

# Data Table Column Filter Widget rendering

 *  Resolved [aleearcher](https://wordpress.org/support/users/aleearcher/)
 * (@aleearcher)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/)
 * Hello
 * I recently purchased the Data Table Column Filter Widget, but I’m having difficulty
   getting the dropdown filter to work for just one column. It is also rendering
   very strangely. I don’t suppose you would know why? All the other TablePress 
   plugins have fitted in well with our theme, except this one!
 * I’ve used the following shortcode to exclude all columns except column 2, which
   is the location. That is where we would like the filter.
    [table id=1 datatables_columnfilterwidgets
   =true datatables_columnfilterwidgets_exclude_columns=1,3,5,6,7 /]
 * Here is the test page with the shortcode above. [http://www.fireandsafetyaustralia.com.au/test-course-page/](http://www.fireandsafetyaustralia.com.au/test-course-page/)
 * Here is the page without the shortcode with the correct look and feel: [http://www.fireandsafetyaustralia.com.au/public-course-dates/](http://www.fireandsafetyaustralia.com.au/public-course-dates/)
 * I’m also having difficulty getting the dates to sort. I’ve downloaded the Data
   Tables Sorting plugin and I’ve started changing all the dates across to numerical
   format i.e., DD/MM/YYYY, but it doesn’t seem to make any difference. I then tried
   to insert the following code, as recommended in the documentation into the Custom
   Commands to force the data type:
    “columnDefs”: [ { “type”: “formatted-num”, “
   targets”: [ 2 ] } ]
 * Do you have any suggestions for both these problems?
 * Thank you and regards
 * Anne
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/#post-7470437)
 * Hi Anne,
 * thanks for your question, and sorry for the trouble.
 * The reason for this seems to be that there’s extra HTML code in your post/page
   content, likely from copy and paste.
    On the page where you entered the Shortcode,
   please switch from the “Visual” to the “Text” editor mode (in the upper right
   corner of the editor window). Then, please remove all `<pre>`, `</pre>` and similar
   HTML codes.
 * For the sorting, please keep in mind, that all cells in that column must be changed
   before this can work! Also, as we are talking about dates, the “type” should 
   be different:
 *     ```
       "columnDefs": [ { "type": "date-eu", "targets": [ 2 ] } ]
       ```
   
 * Can you please try again with that?
 * Regards,
    Tobias
 * Regards,
    Tobias
 *  Thread Starter [aleearcher](https://wordpress.org/support/users/aleearcher/)
 * (@aleearcher)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/#post-7470471)
 * Hi Tobias
 * Thank you so much for your help. When I removed the
 *     ```
       , 
       ```
   
 * , it worked! It looks great. Thank you.
 * I’m still can’t seem to get the date sort to work though.
 * I’ve changed all the dates to DD/MM/YY and I’ve amended the type to “date-eu”.
   However it still doesn’t seem to sort by date.
 * I guess it probably won’t work because some of the dates run over 2 days e.g.,
   30/06/2016 – 01/072016
 * Do you have any further recommendations?
 * Kind regards
 * Anne
 *  Thread Starter [aleearcher](https://wordpress.org/support/users/aleearcher/)
 * (@aleearcher)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/#post-7470472)
 * Whoops sorry, forgot to use the code button when I typed the above. It should
   read, when I removed the `<pre> </pre>` it worked. Thank you.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/#post-7470488)
 * Hi,
 * good to hear that removing the `<pre>` worked 🙂
 * For the sorting: Yes, this is caused by some cells having ranges. The sorting
   algorithm can not properly interpret those, unfortunately. (It’s not smart enough
   to see that this are two dates.)
    Can you maybe split this into two columns (“
   Begin” and “End”)?
 * Regards,
    Tobias
 *  Thread Starter [aleearcher](https://wordpress.org/support/users/aleearcher/)
 * (@aleearcher)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/#post-7470536)
 * Hi Tobias
 * Thank you. I created a second column for End Date and that worked, in a way. 
   It’s not automatic, but at least it sorts in the proper date order if I click
   on the filter arrows on the website.
 * Then, I thought perhaps if I sorted by date in the WordPress CMS and then saved
   the table, that might help, but it doesn’t sort properly by date in the CMS, 
   which is strange.
 * But at least customers can sort it on the website!
 * Kind regards
 * Anne
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/data-table-column-filter-widget-rendering/#post-7470539)
 * Hi Anne,
 * yeah, the sorting on the table’s “Edit” screen is again different :-/ It’s much
   simpler and can not use the same sorting algorithms that are available on the
   frontend. Instead, it only understands the US format (“mm/dd/yyyy”), I think.
 * Note that you can also manually reorder on the “Edit” screen, by using drag and
   drop of the row numbers.
 * Regards,
    Tobias

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

The topic ‘Data Table Column Filter Widget rendering’ 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

 * [date sorting](https://wordpress.org/support/topic-tag/date-sorting/)
 * [rendering](https://wordpress.org/support/topic-tag/rendering/)

 * 6 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/data-table-column-filter-widget-rendering/#post-7470539)
 * Status: resolved