Title: Use string with column filter?
Last modified: August 31, 2016

---

# Use string with column filter?

 *  Resolved [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/)
 * Hi Tobias
 * I would like to ‘pre-filter’ my table. E.g. using a simple PHP script to execute
   the shortcode.
 * The row filter does something like this well. My PHP script simply takes the 
   shortcode passed to it from a form field value and executes it.
 * However, the row filter finds the term in all columns whereas I want to confine
   the filtering to a set of category labels in a special column for filtering (
   and only those labels).
 * I have experimented with combining the row filter and column filter but that 
   doesn’t seem to work. Here’s the shortcode I have tried so far:
 * [table id=11 datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns
   =1,2,3 filter=’cpd’ /]
 * The filter term is in column 4 which is hidden using CSS.
 * It seems that the row filter is not affected by the column filtering because 
   all rows from all unhidden columns containing the filter term are displayed.
 * Perhaps I am not doing this right (likely!) OR this simply won’t work.
 * What would be useful, if it’s possible, would be either:
 * (i) an optional parameter to add a column filter to the shortcode e.g. something
   like columnfilter-4=”CPD”. That way I could automate different views of the table.
   
   OR (ii) make the row filter ignore excluded columns.
 * I hope my description is clear!
 * Incidentally, the string matching used by column filter and row filter is an ‘
   in string’ match rather than a unique match – so ‘CPD1’ and ‘CPD2’ are both filtered
   by ‘CPD’. Again, for my purposes an exact string match would be useful too.
 * I’m not asking for a lot am I? 🙂
 * Any suggestions or advice appreciated. Thanks.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187970)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Those two Extensions are totally unrelated, as one of them works in PHP and the
   other one works in JavaScript. Therefore, combining them is not possible.
 * However, that’s not necessary here. You’ll only need the Row Filter Extension
   plus some extra parameter for it, like
 *     ```
       [table id=11 filter="cpd" filter_columns ="4" filter_full_cell_match=true filter_case_sensitive=false /]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187972)
 * Thanks Tobias – I’ll try that.
 * Did I miss those parameters? I should have read the help pages more closelY!
 * I’ll let you know how that works for me.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187974)
 * Hi,
 * no worries, those parameters are not yet documented properly, so that you didn’t
   miss anything. They are basically just explained briefly in the Extension’s PHP
   file.
 * Regards,
    Tobias
 *  Thread Starter [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187976)
 * Tobias – that is extremely effing brilliant!
 * It works exactly as required …
 * … well, there’s one caveat: I haven’t tried it with my PHP script yet …but I’m
   sure it will be fine .
 * 😉
 * When you get time, your documentation really needs updating to make sure folk
   know how to do this.
 * (Also note – and I’m sure sure you know this – your Row Filter extension is not
   yet listed in the extensions section of your site)
 * This is such a great plugin. Well done. When I finish what I am doing with it
   I’ll post a link.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187977)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Yeah, I know that the Extension is not yet linked there. Mainly, that’s because
   the documentation is not yet finished 🙂
 * Best wishes,
    Tobias
 *  Thread Starter [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187994)
 * I’m sure this is not connected but this morning when I went to carry on working
   on my tables my CSS options page was empty!
 * I did nothing else since I wrote yesterday to say that the shortcode parameters
   you gave me were successful.
 * Thought you should know just in case there’s something going on in the back end.
 * It’s a bit of a worry and rather strange.
 * I can reconstruct it all I think – but it’s a pain as I had quite a bit going
   on in the CSS.
 *  Thread Starter [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187995)
 * Ah – here’s one issue: I had a template file that I created on Friday which I
   named ‘tablepress’!
 * I have just discovered that of course your plugin uses that name too!
 * Could that have caused the loss of my CSS?
 * Have renamed my template file
 *  Thread Starter [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187996)
 * Aha – I’ve found the CSS in the file tablepress-custom.css
 * At least it’s safe but why isn’t it loading?
 * I tried deactivating and restartng the plugin but that had no effect.
 * Any suggestions?
 * Thanks. 🙂
 *  Thread Starter [dlongm01](https://wordpress.org/support/users/dlongm01/)
 * (@dlongm01)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7187997)
 * Final note: I copied the CSS back into the options and saved it. It seems fine
   now (but have spare copy of CSS just in case).
 * Thanks for reading.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7188001)
 * Hi,
 * that sounds strange, but could indeed be just a temporary glitch. Copying the
   CSS back in from tablepress-custom.css is the best way here.
    Also, keeping a
   backup is always good.
 * Regards,
    Tobias

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

The topic ‘Use string with column filter?’ 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/)

 * 10 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/use-string-with-column-filter/#post-7188001)
 * Status: resolved