I'm interested in a wordpress plug-in that is able to make from tags or categories multiple search criteria like left hand side of the following site system http://www.olx.com/dvd-cat-238 When one of the criteria filter is selected the content displayed should be displayed regarding that selection.

If multiple criteria is selected the displayed content should contain all the selected filter simultaneously.

Best regards

4 Answers 4


Just so no one else looses the amount of time I did on this, the code like this:


needs to be changed to:


because the form is using the 'get' method.

Also, 'category_and' should be 'category_in' if you want to check multiple categories.

  • Those argument names are incorrect unfortunately, both should have include double underscores, eg. category__and and category__in. Also you have not made a clear distinction of how the two category arguments differ in functionality. Correct/update both those things in your answer and i'll happily +1 ya.. ;)
    – t31os
    Feb 3, 2014 at 20:02

I started once to write something like that but i never finished it and always customize it for each client that needs this functionality

so enjoy and feel free to use/change any way you want

Plugin Name: BaInternet Search Filters
Plugin URI: http://www.bainternet.info
Description: filter searches by tags and categories
Version: 0.0.1
Author: bainternet בניית אתרים
Author URI: http://www.bainternet.info
* very early beta so watch out.
* Usage: add [search_with_filter] as shortcode to 
*        post/page or widget or call it from a template
*        page like so: echo do_shortcode('search_with_filter');

function ba_SearchFilter($query) {
    if (!$query->is_search) {
        return $query;
    if (isset($_POST['cat'])){
        $query->set('category__and', $_POST['cat']);
    if (isset($_POST['tags'])){
        $query->set('tag__and', $_POST['tags']);
    return $query;
//hook filters to search

function ba_search_with_filters(){
    $out = '<form role="search" method="get" id="searchform" action="'. home_url( '/' ).'">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" /><br />';
            $categories=  get_categories(); 
            foreach ($categories as $category) {
                $option = '';
                $option .= '<input type="checkbox" name="cat[]" id="cat[]" value="'.$category->term_id.'"> ';
                $option .= $category->cat_name .'<br />';
                $out.= $option;
            $tags=  get_categories(); 
            foreach ($tags as $tag) {
                $option = '';
                $option .= '<input type="checkbox" name="tags[]" id="tags[]" value="'.$tag->term_id.'"> ';
                $option .= $tag->cat_name .'<br />';
                $out.= $option;
    $out .='<input type="submit" id="searchsubmit" value="Search" />
    return $out;


  • great plugin, but a quick question. What do i have to change in order for the search to do tag + category rather than search for both tags and category
    – user14154
    Mar 14, 2012 at 20:41

Look at scribu's plugin Query Multiple Taxonomies.

In addition to making the process of querying within different taxonomies possible in earlier versions of WordPress, it includes a drilldown widget similar to the one you pointed out. If you define your taxonomies well, it can be used to make a very helpful interface for users browsing your site.


Hi I'm know I'm late to the party but I've developed this plugin for this exact purpose:

WordPress Search & Filter - WordPress Plugins

You use a shortcode to generate the interface and works with categories, taxonomies, post types and post dates :)

Hope it helps!

  • Unless the person who down voted wishes to come forward, that information can't be gotten. Your answer would become useless if the URL you posted became broken, or 404'd, and it doesn't actually answer the question. Try providing a solution in your answer, rather than simply linking to one elsewhere.
    – Tom J Nowell
    Feb 4, 2014 at 16:41
  • The asker is asking for a plugin "I'm interested in a wordpress plug-in that is able to make from tags or categories multiple search criteria", and I'm linking to a plugin hosted on the wordpress site (its hardly going to go down) so to be honest I can think of no better answer - just think its bad to remove rep when a perfectly good answer has been given and someone has spent time and effort to give that answer..
    – rmorse
    Feb 4, 2014 at 18:31
  • 1
    Ah, I failed to spot the plugin request, plugin recommendations are offtopic on this site, and we advise against posting links as answers as they aren't reliable
    – Tom J Nowell
    Feb 4, 2014 at 19:50