Designs & Code

Design, Development and WordPress

search_slide[1]

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

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

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

  1. Chris

    Everything about this plugin works except the search function. Unless I’m doing something wrong, it seems useless.

    For example, if I limit my category to my about me section and I search for “squat,” the only page that should come up is the page on what I do for exercise. Instead, it turns back every single page in my “about me” section, which includes several articles in which the term “squat” does not appear anywhere.

    Reply
    • Ross

      Hey Chris thats certainly not usual behaviour. If you’re referring to S&F from the repo can you open a ticket here and provide a link? – ttps://wordpress.org/support/plugin/search-filter thanks

      Reply
  2. Jennifer Mangel

    I have downloaded the free version and cannot seem to get either a custom field or custom taxonomy to appear in search list. Other fields/taxonomies appear fine. I’m hoping it’s something simple I’ve overlooked. Thank you.

    Reply
    • Ross

      Hey Jennifer – the free version does not work with custom fields – this is available in pro 🙂

      Reply
  3. Laura

    Hi,

    I’m using your free version and it’s really awesome, was just wondering if it’s possible to change the default value for tags? So instead of it saying “All Tags” it would say something else or is that a pro feature?

    Thanks a lot!

    Reply
  4. Sergey

    Hey! I`m using this code. And it`s really cool.

    [searchandfilter fields=”category,category” submit_label=”Filter” headings=”City,Occupation”]

    But I have the only question.

    Can I choose ON MY OWN what particular categories will be presented in each field? (i mean not all categories, but just some of them). By id or somehow?

    Thank you very much.

    Reply
  5. Steve

    When I include the shortcode in a page I get the search options but when Submit is clicked nothing happens–no results. I’m using [searchandfilter fields=”category,post_tag”]

    Reply
  6. Mehdi

    Hi
    Thanks for your useful plugins.
    I have used it on my local machine and everything is working as well.
    But while uploaded on server, it shows an error like this:

    Warning: Cannot modify header information – headers already sent by (output started at /home/merx/public_html/tour.rudeki.com/wp-content/themes/tour/template-hotels.php:4) in /home/merx/public_html/tour.rudeki.com/wp-includes/pluggable.php on line 1167

    Any help please?

    Thanks again

    Reply
    • Ross

      It looks like you have a PHP error in your template – `template-hotels.php` – this error is preventing the page from being redirected (and in turn, prevents S&F from working). Thanks

      Reply
  7. Hello, I try to set up the search only for medias “ex PDFS”, but I can not do this, any tip for make this possible?
    Tahnks you.

    Reply
  8. Gord

    Hi
    I am trying out the latest version from WordPress – 1.2.9 and cannot get the post_types to work. I am using this shortcode in a text widget…

    [searchandfilter fields=”category,post_types” post_types=”gpage” types=”checkbox” hierarchical=”1″ hide_empty=”1″]

    and everything works apart from it returns search results from all posts. I tried adding fields=”gpage” too and it created the dropdown but again made no difference to the search results. Is this filter only available to pro? If so, apologies as I missed that!

    Great plugin.

    Cheers

    Reply
    • Ross

      It sounds like you may have a filter on your query (from your theme) that changes all queries to search in all post types.

      By default, WP will use the post type `post`, and many themes expand this by using a filter like `pre_get_posts` – but it seems like this is overriding the S&F setting for the post type in the query – check your `functions.php` for anything like `pre_get_posts` as this may be the culprit.

      Thanks

      Reply
  9. Paul Adams

    Hi,

    I would like to know if the Search-Filter Pro version is able to make a search for WordPress user roles and user profile meta data.

    This search and results would be needed for front-end display only and not in the WordPress Dashboard.

    Thanks

    Reply
  10. Naveed Kharrat

    Hello – I’m looking to purchases this and have just downloaded the free version. However, when clicking on the admin option, I’m only directed to the overview page with no ability to actually create a filter.

    Any help?

    Reply
  11. how can we change the size of the dropdown title…cause “all items” in English corresponds to “Toutes les catégories” in French and it ‘s too big to appear completely…so i d like to change the size of the dropdown itself OR change the item’s size. thanks in advance

    Reply
    • Ross

      This would just be some CSS, something like:

      select
      {
      width:200px;
      }

      Of course this will change the width of ALL the dropdowns on your site, so you will have to use the correct class around the select, which is based on your field name I believe.

      Thanks

      Reply
    • Ross

      Yup it works with multisite – but it doesn’t search across all sites – each site has their own separate environement

      Reply
  12. JC

    I can t quite seem to figure out how to add ACF custom fields to the shortcode, anyone?

    Reply
    • Ross

      ACF fields are not supported in S&F free I’m afraid – only available in pro

      Reply
  13. Matty

    How can I use this to only show a custom post type that I have created?

    For example, I want to display a search and filter on a “products” page which only filters and searches for posts which are in my “products” custom post type along with their relevant tags and categories.

    Hope you can help! 🙂

    Matty

    Reply
  14. Vladan Krstic

    Is it posible to have the search form in a line. I guess it can be done via CSS.
    And can the results be displayed horizontally with arrows to click on the left and right to see more, like in a slider.

    Reply
  15. Mateo

    Hi,

    i have a question. I´m not shure if i understand the thinks right. When i install the search & filter plugin i need another plugin to tag my text or my products, for this reason the search & filter plugin knows how to relate the right product to the right categories. And the other plugin could be TinyMCE. Right?

    sorry for my broken english. I hope you can understand my words.

    Thanks a lot

    Reply
  16. Hi,

    I’m trying to set a filter by words of type “search” that show results related in a taxonomy.
    I would like to know if it is possible to add a parameter to the search taxonomy .
    Example:
    [searchandfilter fields=”search” submit_label=”Search” post_types=”post”]
    Taxonomy: Tax1, Tax2, Tax3….
    I would get results related to the search word and also contain “Tax1”
    Current url: …?s=software&post_types=post
    Url that i’d like to get: …?s=software&post_types=post&taxonomy=tax1
    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *