Designs & Code

Design, Development and WordPress

Posted by & filed under CSS, Development, HTML, PHP, Plugins, WordPress.

WordPress Search & Filter is a simple search and filtering plugin.  It is essentially an advancement of the WordPress search box, adding taxonomy filters & post filters to really refine your searches.

You can search by Category, Tag, Custom Taxonomy, Post Type or any combination of these easily – you can even remove the search box and simply use it as a filtering system for your posts and pages.

After my own requirements of needing some granular filters applied to my searches I tried a few free plugins online and found none quite did what I need, there are many plugins that enhance the search box, and there are others that allow filtering of taxonomies but none that combine the two and are free (as far as I can tell).

The best free plugin I found was the Query Multiple Taxonomies Plugin – however it did not allow you to search at the same time as applying the filters.

And so the Search & Filter plugin was born:

 

Download Wordpress Search & Filter

Grab the download any of these sources:

WordPress Plugins GitHub

How To Use

To display Search & Filter all you need to do is a use a shortcode:

[searchandfilter fields="search,category,post_tag"]

This will display a search box, a category dropdown and a tag dropdown. You can use the shortcode within posts/pages and widget areas.

To use this within a theme file you simple need to call the `do_shorcode` function with the shortcode above within the theme file:

<?php echo do_shortcode( '[searchandfilter fields="search,category,post_tag"]' ); ?>

Documentation

Official documentation can be found on our docs site which contains usage examples and advanced settings & features.

Screenshots

[metaslider id=946]

Need More?

Get the pro version:

  • Search with Ajax πŸ™‚
  • Filter by Date, Author & Post Meta / Custom Fields
  • Sort results by Post Meta / Custom Fields
  • Range Sliders and Range Fields for Meta Data
  • Drag and Drop user interface – makes it incredibly easy to build a granular search form
  • Works with WooCommerce, Advanced Custom Fields Plugin & more
  • Dedicated Support

Find out more

Links

– Official Documentation
WordPress.org Plugin
Github Project

331 Responses to “WordPress Search & Filter – A Simple Search and Filtering Plugin for Taxonomies”

  1. dolomats

    Hello

    I just installed the plugin, nice one exactly what i was looking for
    but unfortunately the date field just show as a normal texfield
    dosnt show u the calendar to browse the date

    Any help ?

    • Ross

      Hey dolomats – the free plugin uses the native HTML 5 date field – so you are probably using a browser that hasn’t implemented this just yet (try looking at it with Chrome) – the pro version has a jQuery date picker which works on all modern browsers πŸ™‚

  2. my problem is, in my site i am using search & filter plugin and in that i want to change “All Tags” word to replace with another word.

  3. Luiza Campello

    The plugin seams to be great… but I needed that i could INCLUDE only the tags and categories i want, and not EXCLUDE the ones i don’t want.

    Just excluding the cats and tags I donΒ΄t want to appear, every time I create in the blog I need to go to the search form and exclude in the plugin.

    Is there anyway I can fix in the plugins the cats and tags?

    • Ross

      Hey Luiza

      This feature is coming to the pro version in about a week πŸ™‚

      Thanks

      • Ross I have a question too and it says that the comment its awaiting moderation.. I really need an aswer please

        • Ross

          Hi Catalina – you can include/exclude categories with the free plugin but the is has just been added to the pro version πŸ™‚

  4. Hi,

    Is there a way to exclude a category, or categories from the drop-down list. I only have the single search field, and I don’t want all of my categories to display in the dropdown.

    Thanks,

    Molly

    • Ross

      Unfortunately not – but the pro version includes this functionality

  5. Hi there thank you so much for this great pluggin.

    I was wondering if there is any chance to choose the categories appearing in the filter such as it can be done with the post_types. I dont want to show all the categories,,, just two of them…

    Another thing is that if I want to edit the padding between lines how can I manage to do this?

    Thanks!

    • Ross

      To edit the padding between the lines you must add some CSS – something like:


      .searchandfilter li
      {
      padding:10px;
      }

      Thanks

  6. Hi, I get this:
    Warning: Cannot modify header information – headers already sent by (output started at /home/deb83152/domains/easy-demo.nl/public_html/wp-content/themes/bridge/page.php:22) in /home/deb83152/domains/easy-demo.nl/public_html/wp-includes/pluggable.php on line 1121

    and with deug:
    WARNING: wp-includes/functions.php:951 – Cannot modify header information – headers already sent by (output started at /home/deb83152/domains/easy-demo.nl/public_html/wp-content/themes/bridge/page.php:22)
    WARNING: wp-includes/pluggable.php:1121 – Cannot modify header information – headers already sent by (output started at /home/deb83152/domains/easy-demo.nl/public_html/wp-content/themes/bridge/page.php:22)

    Can you help (I am not a programmer) thanks!!

    • Ross

      Hey Jeroen

      The error you are getting is because S&F cannot redirect the page to your search results page – and this is because of this error.

      It is telling you that on line 22, of `page.php` in your theme, there is a php error – so before the search form will work you must fix this PHP error :/

      If you want open a ticket in support and I will try to help you further πŸ™‚

  7. Cheryl

    Hi, this plugin looks like it will work perfectly for my client’s site, but I want to put it in the header. I added this code to the header.php:

    And it looks fine (except I need to float it right), but when I do a search I get this error – and I saw that someone else above got it, too, but you responded that the plugin update fixed it. I have the latest version and I’m getting this error, unfortunately.

    Warning: Cannot modify header information – headers already sent by (output started at /home1/marlandc/public_html/dev.yama/wp-content/themes/basis/product.php:9) in /home1/marlandc/public_html/dev.yama/wp-includes/pluggable.php on line 1121

    Any suggestions on how to fix this? Thanks

    • Cheryl

      Let’s try again leaving out the php stuff

      php echo do_shortcode( ‘[searchandfilter taxonomies=”category,post_tag”]’ )

    • Ross

      Hewy Cheryl, it normally if there is output before the headers are sent this means there is an error in your code somewhere as there shouldn’t be – have you tried using a plugin such as Debug Bar and enabling debug mode in WP to find out what might be causing it?

      Thanks

  8. Kathryn

    The drop-down boxes are not showing any sort of border around the white space. Is there an easy way to add a thin black border so that they stand out on the page a little more?

    • Ross

      Hi Kathryn

      You could try adding some CSS:

      `.searchandfilter select
      {
      border:1px solid #000;
      }`

      Thanks

      • Kathryn

        Unfortunately, I added the CSS to the folder search-filter/style.css and it didn’t make a difference…Is there something else I can try?

    • Ross

      Hey Kuljeet, are you referring to the free version of the plugin?

    • Ross

      Hey there unfortunately not –

      Normally the plugin will use something like `archive.php`, `category.php` but it depends on your theme which template the plugin is using. Once you have found the template that is in use, you can copy the code from `search.php` to the template (eg, `archive.php`) and the results should look the way you like πŸ™‚

      With the pro version however it is much easier – you can choose any template you like πŸ™‚ (http://www.designsandcode.com/wordpress-plugins/search-filter-pro/)

      Thanks!

  9. It would be a great plugin if you are ready for multilingual users. Scheduled and non-existent or planned version for multilingual user?

  10. Hey Ross,
    Thank you for this plugin, it is exactly what I was looking for. One question, is there a way to limit the search to one specific category only?

    Thanks!

  11. yeahman45

    is it possible to add an action parameter for the ? so that submission and redirection is done on this action parameter?

  12. yeahman45

    This is a great plugin! Is there a way to define my own template file? or is there already a template suggestions for the archive.php template? e.g. archive-search-filter.php?

    • Ross

      Hey yeahman45

      Unfortunately there is not. I will be releasing a pro version of the plugin in the next couple of days, which is completely rewritten from the ground up which will allow for template selection as well as many other features. If your interested leave your email address over on our contact form and I’ll let you know when its ready – http://www.designsandcode.com/contact – I’m also sending out discount codes for anyone that registers their interest before it is on sale πŸ™‚

      Thanks for checking out the plugin!

      • yeahman45

        does this mean that you won’t maintain the free plugin anymore πŸ™ .. I liked the open source free philosophy of this plugin πŸ™

        • Ross

          Nope, I will continue to support and improve the free version, albeit at a slower rate – the source code will remain open source and open to anyone to improve.

          The problem is, the plugin started as a way to solve a problem I had, but, using only a shortcode as I have found out (this was my first plugin for WP) becomes very limiting – there are just certain things you cannot do with a shortcode as they only get processed once a page has already begun loading.

          The free version will remain in shortcode form, which includes all the limitations of that, whereas the pro version has a full UI and admin interface which allows it to be much more powerful.

          I get what you are saying about open source nature, which is why its staying that way, but this was always a part time project, the pro version however has been a full time project with the intention of providing more functionality and guaranteed support (its taken me months to develop so far).

          Any improvements I make to the pro version that will be compatible with the free version in shortcode form will be ported over as long as the shortcode doesn’t get too bloated! If you or any other developer feel like updating you can find it over on github and I’ll be sure to include any updates – as is the nature of open source!

          Thanks

    • Ross

      Hey Tuomas

      Yeah I’m developing a completely new pro version which uses a drag and drop interface and will have support for custom fields…

      Should be ready hopefully in a week! If you’re interested leave your email here and I’ll notify you when it is released πŸ™‚

      http://www.designsandcode.com/contact/

      Thanks

      • Ross

        Tried all of what you suggested and ended up with the same pop up of my site with the 404 error. Not savvy enough to use the FTP.

  13. Vincent

    Hi Ross, awesome work thanks. I am having a small issue and I am not sure if it’s a bug that needs to be reported or if I am doing something wrong:

    I filter categories, tags and a custom taxonomy. All works well, except when the filter is set to search all (ie: no filtering). The resulting URL is http://www.mysite.com/?s= and weird things are displayed, but not all posts exerpts . Have a looks at http://take.ms/TG4yd. Anything I could do for this not to happen? Thanks,

    • Hey vincent, head to line 1040 in search-filter.php and comment it out πŸ™‚ this is what forces a “?s=” on blank searches! thanks for checking out the plugin

  14. Simone Baglioni

    Thank you! Thank you! Thank you so much! I spent a lot of hours trying to find your plugin. It was the last missing part on the last site! Thanks again! S.

  15. Yael Reinhardt-Matsliah

    I’ve installed your plugin and it works great! Thank you. One question though — any chance that I might be able to remove category from the drop down list of categories? Probably not but thought I would ask. Thank you.

    • Hey there, unfortunately this is not possible at the moment with the plugin but I’m working on it for the future πŸ™‚

  16. Joseph B

    Is there a way to
    – Not have “All Posts” as a viable searchable option? Like if the submit button didn’t work unless a real option was selected? Because when it returns ‘/?s=’ it really screws with the ux.
    Thanks.

    • Hey Joseph it wouldn’t be too hard to prevent a submit using jquery as an alternative, just use jquery to loop through the form variables on submit, and if any of the dropdowns are set to ‘0’ then do not allow submit πŸ™‚

Trackbacks/Pingbacks

  1.