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. Gabriel

    It is possible to take two specific categories instead of all?

    • Ross

      Sure, you can include/exclude categories from the search results via a settings panel 🙂 – oops – edit – this is available only in Pro

  2. I like the filtering option very much. Can I also use it for setting up filtering portfolio items in categories?

    Thanks for answering.

    Regards,
    Monique

    • Ross

      I don’t see why not! You can set things like post types and categoreis to include in your search form, and you can multiple forms with different settings 🙂

  3. Do you have any documentation/tutorials on setting up the results page?

    I am using ‘get_term_by’ and I can get the first slug but if there are multiple in the search then I can’t get them both. For example my url after the search has ?people-category=advocacy&people_location=atlanta

    I need to have a variable for both so that I can populate a custom loop but I can’t figure out how to get more than one category from the URL.

    Any help would be greatly appreciated.

  4. kim

    Hi Ross, thanks for the great plugin. I just wonder is the plugin can filter two attributes. For example, I have a product is in star shaped and yellow. When customer searching on our site, when they choose Star shaped and Yellow, the product will show.

    Here is the example

    Shaped
    X Star Shaped
    Square
    Round
    Pig shaped

    Color
    Red
    White
    X Yellow

    FILTER

  5. Hi there, I need to know if I can search in post date, but only by year.

    I need search in years in select format, and not with the data range with star date and end date.

    Is it possibile ? I need to know before buy the plugin.
    Thank you

    • Ross

      If you are talking about published date – this is not available yet but have been considering adding it in. If this is a single “year” custom field that you have added to the back end using something like ACF, then you should be able to do this – the year field will just be a “number” field. Thanks

  6. Is it possible to create a ‘Reset’ button that will set the search back to its intial, unfiltered state? Or would that just refresh the page?

    • Ross

      I’ve recently added a reset button to the Pro plugin – but there isn’t one in the free plugin – if you know js/jQuery you could possibly implement this yourself.

      Thanks

  7. Mike

    Could this somehow be used as the backbone of a site focused on filtering by options?

    Example, if I wanted to contain some data on a site – like which games were offered, or which credit cards they accept, and which countries they ban users from – could that data all be contained somewhere, and using your plugin, allow users to filter and sort and DISPLAY without new pages/urls needed, so displaying within a post or page.

    Please let me know asap how this could be accomplished, even if it’s custom. I’ve had numerous developers tell me WP is very difficult to store any info or databases in, but I’m learning that it could be done potentially with custom fields, metadata, tags, or various other options.

    Looking forward to discussing….

    • Ross

      Hi Mike

      This all sounds possible, what you would do is create a custom post type, and from there you can layer on information to filter the “custom posts” – custom posts are used as a much more versatile data format that just “posts” and can power many different types if data and interactions, such as galleries, reviews, products – just about anything you want to be able to categorise and sort. Check out the movies demo, here you can see how the filters and functionality interact. In terms of data, a movie review is a custom post type that I’ve created with another plugin, and I’ve also created custom taxonomies and custom fields for various data associated with a movie review.

      You’d need to get all your content ready in this format in order for it to work with S&F Pro. Let me know if you have further questions.

      Thanks

  8. Hi,

    I would like to add in the search criteria the selection of items according to the author. But the trouble is that the authors are listed by a plugin, and I can not make the connection between “serach & filter” and authors.
    Do you know if it is possible to add a test like this?

    thank you

  9. I found out its browser support issue do to the fact its html5 date picker, I am planning to use the bootstrap jQuery date picker but I need to get a full understanding of the css of plugin I see a tag in the form called “postform” in the form thats the css for picker

  10. Hi we are using your plugin so we can do search for 2 things, Trade type and Postcode to bring up the post within this area. we have this function and happy but is there a way to make the search boxes look cool ie change stile, font colours, box sizes etc

    cheers scott

    • Ross

      Hey Scott – cosmetic changes are only supported with CSS – so take a look at some css examples and working with forms and I think you’ll be on the right track.

      Thanks

  11. This plugin have browser (IE and Firefox) issue with relation to the date picker not working and also the category drop-down not display the toggle option and there is no css relate to that option in the plugin that I could customize, help me please and thanks in advance

    • Ross

      Hi Hikeno

      If you understand CSS you can of course customise the look and feel – there is a CSS class applied to the search form. The date picker is using native html5 date field – which is not supported with those browsers – get the pro version to get a jQuery date picker which works across all browsers.

      Thanks

  12. Hello there!

    The plugin is super simple and the documentation helpful, yet I seem to have a problem that no one else seems to be experiencing (so excuse me if I’m being a moron):

    I have put the shortcode into a text widget in my sidebar (and have also tried on a page), but it looks like it’s not loading the CSS it’s supposed to. It’s just plain html-style, and honestly looks horrible. Did I miss a step somewhere or something?

    Here’s the website in question, so you can see for yourself: http://stefan-christensen.com/abild2015

    Thanks in advance,
    Stefan

    • Ross

      It looks like its loaded but your theme is overwriting some of the styling – you’ll have to use CSS to fix it.

  13. Klaus

    Hi, one pre-sale question for the pro version:

    I have a woocommerce shop with additional product fields, not added via a plugin but directly through functions.php. One of them is a catalogue number, for which I need to enable search functionality, based on product category (so show me catalogue number xxx of of this category) – result can therefore always be only one single product. The number should be entered manually, not with a dropdown.

    Possible?

    Thanks in advance!

    • Ross

      Hey Klaus

      So if you mean, the user can input a catalogue number in the search field and it will match it exactly then that shouldn’t be a problem – you can integrate this plugin with the Relevanssi plugin, which adds all kinds of powerful search to the search box – and then this plugin will take care of the rest (like dropdowns etc) 🙂

      Thanks

  14. Hello!

    Love the plugin!
    I’m just not sure how to make the results page be like they are in the demos.
    In the demos, the results show up in the same page — when I search, my results go to another page with a 100% width search results and no search sidebar.
    Help!

  15. Dan

    Hi Ross,

    im using the plugin for the first time. I have two custom taxonomies setup on my wordpress install (sectors, and disciplines), and am using the following code in my template:

    However, the output is only showing checkboxes for the first taxonomy that is called. If i switch the taxonomies around (eg put disciplines first in the ‘fields’, then it still shows the first, but not the second, but does change the listing accordingly (e.g the taxonomies seem to be working fine on their own, but it wont display two at a time)

    Is there something im missing here? Any help would be much appreciated!!
    Ta!

    • Dan

      Hi Ross,

      actually managed to figure this out last night, hadnt realised that the default value for showing empty items was to hide them (and hadnt added any actual content using the cusotm taxonomies). Have now got these showing by changing the hide_empty value for each.

      Great plugin, will most likely be upgrading to the full version to take advantage of the ajax loading

  16. efactor

    Is it possible to divide categories and subcategories in two different (but linked) box?
    I mean: I need to have a first SELECT with a list of Districts as options. After selecting this, a second select should have all and only the cities of the selected District….

    In other words, I need a hierarchical division that populates the second select box depending on what has been chosen in the first

    • Ross

      This will be available in the next major release – I would say anywhere from 2 weeks to 2 months depending on how much time I get for development.

      Thanks

  17. Alex

    If I use [searchandfilter taxonomies=”category”] to display a dropdown with all my categories, will there be a way to hide the “uncategorized” item? It is the default category by wordpress an cannot be removed within the categories-section.

    • Ross

      Hey Alex, you an remove specific categories or taxonomies in the pro version. The free version has the option “hide_empty” however which you may find useful – check the docs.

    • Ross

      Single site means you can use the plugin on 1 domain, developer license means you can use the plugin on unlimited domains.

      Thanks

    • Ross

      Hey Erwin you can add a price filter with the pro version – the basic version does not have this.

  18. Hi there,

    i am looking for 3 hours now trying to find where i can change the word: submit into another dutch word…
    Where do i have to be ?
    in the style.css? mainstyle?
    Pleaaase help me on this one.
    thanks