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. When I select a category and search nothing happens- how do you get it to pull up posts by that topic/keyword selected? Thanks.

    • Ross

      The url should change which should represent your search – and the results should be automatically updated… is it not redirecting after search? (assuming you are on S&F free version)

  2. David Walton

    Hello. Is there any way I can choose a default Category instead of the ‘All Categories’ option being default when the page is loaded?

    My issue is that I only ever intended for this plugin to be used with one type of post category, and when that category is not selected my search results page displays incorrectly.

    My issue in more detail:

    I have Category ‘Vendors’ which the search & filter should work with, and only this category. Other filters include Region and Range. When I select the Vendors category and other filters, the search URL appears as:

    http://www.site.com/category/vendors/?region=asia&range=mens

    However, when no category is selected, but the same filters are chosen, the URL appears as:

    http://www.site.com/region/asia/?range=mens

    But this doesn’t display correctly. I specifically need the /category/vendors/ page because the all the code, php, css, you name it for that section of my site is different.

    If there is not a way to select a default category, then maybe I can manipulate these URLs manually in the php file? Only I don’t know where to look.

    • Ross

      Hi there, those links seem to go to a 404 now. I’m assuming you are on Pro considering your question, if so please open a ticket on support – https://www.designsandcode.com/support/ and we can help further – it sounds like we can do what you need, its just a matter of configuring the settings correctly. Thanks

      • David Walton

        Hello Ross,

        Thank you for your reply. In fact the URLs were never working URLs, I only posted them as an example of the kinds of search strings that were appended to them under different situations. I’m using the free version at the moment. The frustrating thing is that I used to have this working the way I wanted, but maybe due to some update of WordPress or another plugin it became broken?

  3. Hi there.
    I would like the search plug in to search content of another plug in I am using on my webpage. This other plug in is an information form that the page visitors fill in, and I would like the search plug in to search in the information submitted in that form. This does not seem to work now http://stallkartan.com/sok-stall/ (in Swedish:))

    How do I do that, or do I need the Pro version for that?

    Thanks!
    Charlotte

    • Ross

      I’m not sure its possible, how does the other plugin store the data from the form? IF, the data is stored as a custom post type, with custom fields and taxonomies, then it will be possible – its best to find out from the other plugin author though.

      Thanks

  4. Yazan

    I have 2 post types and 2 taxonomies linked to them. I want a dropdown of post types, and when a post type is selected, a dropdown of the taxonomy linked to that post type only should appear. How can I achieve this?

    • Ross

      You would need to have both taxonomies visible, and write some custom javascript to show / hide the taxonomy based on the selection of post type.

  5. Hey, on occasion I see a 500 site message when I browse this page. Just a heads up, cheers

  6. Jason Lawton

    When I try to pass multiple tags, it works properly, like ?tag=term1+term2.

    But if i have a /category/cat1+cat2/?tag=term1+term2&…

    The get_query_var(‘category’) only returns ‘cat1’, not ‘cat1+cat2’ as is expected. Any suggestions for a fix?

  7. Hi there,

    I have been using the plugin for some time to display my results as a combination of tags, taxonomies and formats – it works great! I have now added dates to the mix (date range) so it kinds of acts like my archives. It works beautifully BUT I do have a slight display issue on my mobile device (iPhone6s). The date field is displayed and very narrow line, rather than a field in which I would expect to see dd/mm/yyyy. Once you click on it works absolutely fine, it will then expand to show the date you’ve chosen from the calendar and remain the right width. It’s ok in the browser, the problems in on my mobile device only. Is that something I can prevent from happening? Sorry my blog is a family blog and is password protected, so can’t demonstrate.

    • Ross

      I’m not sure why, we use the HTML 5 date field, which means its interpreted by the browser viewing the search form. Mobile browsers can do things radically different because of the UI. S&F Pro is not affected by this as we use a jQuery date picker. Hope that helps.

      • emilk

        Since posted it I’ve forced this particular date field height in CSS so it shows as a proper field now rather than a narrow line 😉 thanks for your response! The date picker still doesn’t work properly on all browsers but this has been explained so I know why. :

  8. Rub

    How do I can get support and register to the forums?
    All the forums are only for the pro version?

    • Ross

      The forums are pro only and free support is currently on hold until we release the next version – this will be in the next few months and will be a complete rewrite 🙂

  9. Damon

    How can I use the post date to filter posts based on an Advanced Custom Field called start_date.

  10. Akhila c.c

    Hi,
    I upload the search & filter plugin.when adding different taxonomies into it some are displayed as ‘All Terms’ and others are displayed correctly. Why it displayed like that.how can i change it.

    Thanks
    Akhila

  11. Nikos Kapoglou

    Hi there. Just downloaded the plugin which actually looks perfect. The thing is that i just installed it but in the back end of wordpress i see only the “search & filter” menu but no settings submenus.

    Do i need to do something to appear?

    I am installing in wp 4.6.1 and i am using the avada theme

    Thank you in advance and i look forward to your answer.

  12. Hello! When I use the search & filter I would like all the blog posts that fit the categories/tags to show up. As it is, only the most recent post fitting the search & filter categories shows up and then one must click on newer or older post to see the others. Is there a way to fix this? Thank you!

    • Ross

      The amount of results shown is controlled by your WP settings, head to `settings` -> `reading` and change the option `Blog pages show at most`. Thanks

  13. Nati

    Hi,

    when I choose a category out of the list and then click “submit” I only get a blank page. Why?

    Thanks for your help!

    • Ross

      Ensure WP debugging is enabled, and try to look for errors – if you get a “headers already sent” error, then it means you have an error in your setup, and S&F can’t redirect to the results page. In this case you must find the cause of your error and resolve in order to allow for S&F t work.

  14. Mark

    Hi there, I’m trying to figure out a way to combine the results of two taxonomies. As it is right now, “taxonomy1/term1?taxonomy2=term2” and what I’m after “taxonomy1/term1+taxonomy2=term2”

    • Ross

      With S&F free, the search will go to either the search page, or a taxonomy archive page (depending if you have taxonomy filters)… So for search page you need to edit `search.php`, and for the taxonomy archive it will likely be `archive.php` – however, your theme could be using other templates for these pages according to the template hierarchy – https://developer.wordpress.org/themes/basics/template-hierarchy/

      S&F Pro actually has a setting which simplifies this, you just specify the name of your template and this file will always be used for your search results.

      Thanks

  15. Hi, I tryed to modify the “All” word in front of string “All categories” (Dropdown lists) to “Tutti”, because I wsant to translate it in italian but with no success. Where I have to change to have it? Thanks.