Title: Filter table through url?
Last modified: August 21, 2016

---

# Filter table through url?

 *  Resolved [Quest The Wordsmith](https://wordpress.org/support/users/quest-the-wordsmith/)
 * (@quest-the-wordsmith)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/)
 * Hey Tobias,
 * I was wondering if its possible to have the table filtered via some fancy url?
   I’m thinking that instead of telling people to visit my site and type something
   into the table’s search bar, it would be possible to have some link like
    `http://
   mysite.com/page?search=mysearch` I totally made that up, but I think you get 
   what I’m talking about. Didn’t know if that’s possible with Tablepress. Thanks!
 * [http://wordpress.org/plugins/tablepress/](http://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129505)
 * Hi,
 * thanks for your question!
 * Yes, something like this is possible by using the regular Row Filter Extension
   from [http://tablepress.org/extensions/row-filter/](http://tablepress.org/extensions/row-filter/)
   together with the Extension from [https://tablepress.org/extensions/shortcode-filter-get-parameter/](https://tablepress.org/extensions/shortcode-filter-get-parameter/)
 * Regards,
    Tobias
 *  Thread Starter [Quest The Wordsmith](https://wordpress.org/support/users/quest-the-wordsmith/)
 * (@quest-the-wordsmith)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129618)
 * This works like a charm! One more question. How would I pass a “space” character
   through the URL. For example, in the regular search box one could type “mission
   accomplished” with the space in between. I tried using a “%20” in the URL, but
   it doesn’t work. Any thoughts?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129619)
 * Hi,
 * good to hear that this works! 🙂
    To use a space character, please try a “+”,
   like
 *     ```
       http://www.example.com/?table_filter=word1+word2
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Quest The Wordsmith](https://wordpress.org/support/users/quest-the-wordsmith/)
 * (@quest-the-wordsmith)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129621)
 * The plus sign didn’t do it :/ I also tried putting the 2 words with the + in 
   quotation marks, thinking maybe they need to be contained or something. Any other
   ideas? If not, it’s not that big a deal. Thanks bro, your incredibly prompt with
   your support!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129627)
 * Hi,
 * weird… But before we investigate this in more detail, let’s clarify:
    Do you 
   want to search for the exact string “word1 word2” in a row, or do you want to
   search for “word1” or “word2” in a row, or do you want to search for “word1” 
   and “word2” in a row?
 * Regards,
    Tobias
 *  Thread Starter [Quest The Wordsmith](https://wordpress.org/support/users/quest-the-wordsmith/)
 * (@quest-the-wordsmith)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129649)
 * Wow, you got me on that one. Didn’t think of those types of searching options.
 * My specific need is to search for the exact string “word1 word2” but I’d love
   to see how the other ways are possible also.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129655)
 * Hi,
 * yes, the Row Filtering Extension has some flexibilty. For the possible connectors,
   please see [http://tablepress.org/extensions/row-filter/](http://tablepress.org/extensions/row-filter/)
 * Now, to make those work with the URL parameter Extension as well, a small change
   is necessary in the file “tablepress-shortcode-filter-get-parameter.php”. Please
   change line 17 from
 *     ```
       $filter_term = preg_replace( '#[^a-z0-9]#i', '', $filter_term ); // only allow characters a-z, A-Z, and 0-9 in filter term
       ```
   
 * to
 *     ```
       $filter_term = preg_replace( '#[^a-z0-9&| ]#i', '', $filter_term ); // only allow characters a-z, A-Z, and 0-9 in filter term
       ```
   
 * That will not only allow the `||` and `&&` (which however has to be written URL-
   encoded as `%26%26`, but then also the space (for exact matching of “word1 word2”).
   You can then either use the  or the encoded version `%20`.
 * Regards,
    Tobias
 *  Thread Starter [Quest The Wordsmith](https://wordpress.org/support/users/quest-the-wordsmith/)
 * (@quest-the-wordsmith)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129659)
 * Thanks Tobias. Made the change and everything works as expected. Awesome!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129662)
 * Hi,
 * very nice! 🙂 Good to hear that this worked. Thanks for the confirmation!
 * Best wishes,
    Tobias

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

The topic ‘Filter table through url?’ 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/)

 * 9 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/filter-table-through-url/#post-4129662)
 * Status: resolved