This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.



Facetious lets you add a faceted – often called an ‘advanced’ – search form to your WordPress website. It comes with a ready-to-use sidebar widget, plus a number of implementation options for developers.

A Facetious form can include dropdown lists of:

  • Taxonomy terms (tags, categories, and custom taxonomies)
  • Months
  • Plus a conventional search input box

You can also restrict searches by post type (singular), if you so desire.

Additionally, Facetious introduces an extra ‘pretty permalink’ structure around search queries, which may help your site performance if you’re using a caching plugin like WP Super Cache. Also, they look a heck of a lot friendlier than ?s=polly&post_type=pet&category=bird. (You don’t even have to display a faceted search form on your site to benefit from these, by the way).

Please note – Facetious isn’t a replacement search engine; it helps you construct the search query, but then it’s over to WordPress to run the actual search.


Facetious is a product of Code For The People Ltd, and is based on work done during 2012 on behalf of several UK public sector clients, among them:

… which is why we’re keen to offer it for wider public use.

Fork me on GitHub!


The simplest way to add a Facetious search form is to add the Facetious widget to your sidebar. You’ll see a complete list of options so you can choose which fields to include in your search form.

Advanced Usage

Developers can use a template function to output a Facetious search form and have complete control over the form and its fields, such as text labels, class names, etc.

The main template function for outputting a Facetious search form is facetious( $args ). If you want to ensure the site doesn’t break if the Facetious plugin is deactivated, you can use do_action( 'facetious', $args ); instead.

‘$args’ is an array of arguments thus:

  • submit – string – The text for the submit button.
  • echo – boolean – Whether to echo the form out or not.
  • class – string – The class name for the form.
  • id – string – The ID attribute for the form.
  • fields – array – A list of fields to show in the form. See below.

Each item in the ‘fields’ array can be either:

  • A string name of a taxonomy
  • An array of details for the field (see below)
  • One of s, m or pt for the keyword search input, month dropdown and post type dropdown respectively

For each field specified as an array you can specify:

  • label – string – The descriptive text for this field. Defaults to the name of the taxonomy, or ‘All types’ for post types..
  • class – string – The class name for the field.
  • id – string – The ID attribute for the field.
  • all – string – The “All items” text for this field. Defaults to the ‘all_items’ label of the taxonomy.
  • options – array – For a taxonomy provide an array with the term slug as the key and the term name as the value, e.g. array( 'term-1' => 'Term 1', 'term-2' => 'Term 2' );, for post type supply an array of post type names.

Example 1:

do_action( 'facetious', array(
    'submit' => 'Search',
    'fields' => array(
) );

Example 2:

do_action( 'facetious', array(
    'submit' => 'Search',
    'fields' => array(
        'custom_tax_1' => array(
            'label' => 'Select an option',
            'class' => 'my_tax_class',
            'id'    => 'my_tax_id',
            'all'   => 'All terms'
) );


  • A faceted search form in action
  • A customised faceted search form
  • The widget options panel


You can install this plugin directly from your WordPress dashboard:

  1. Go to the Plugins menu and click Add New.
  2. Search for Facetious.
  3. Click Install Now next to the Facetious plugin.
  4. Activate the plugin.

Alternatively, see the guide to Manually Installing Plugins.


The simplest way to add a Facetious search form is to add the Facetious widget to your sidebar. You’ll see a complete list of options so you can choose which fields to include in your search form.

Please see the full plugin description for advanced usage.


Does this plugin play nicely with WPML?


Where can I help out with development?

Fork me on GitHub! We welcome pull requests.


Thank you

Great job!!!.Is there anyway to display product name or title or content as a search criteria
Thank you.

Read all 11 reviews

Contributors & Developers

“Facetious” is open source software. The following people have contributed to this plugin.


Translate “Facetious” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Remove some PHP 5.3-specific code to avoid a fatal error when running PHP 5.2.


  • Avoid some encoding and slashing issues.
  • Add some basic default stlying to fields in the Facetious widget.


  • Introduce an accepted value in the fields to display a post type dropdown
  • Add documentation for use of options value in a field for either post type or taxonomy


  • Avoid double slashes in URLs when using WPML


  • Introduce an ‘options’ argument for taxonomies in the template function


  • Avoid a WPML redirection bug.


  • Initial release.