yes the begin text:
About
Search & Filter is a simple search and filtering plugin for WordPress brought to you by Designs & Code.
It is essentially an advancement of the WordPress search box, adding taxonomy and post type 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. Taxonomies and Post Types can be displayed as dropdown selects, checkboxes, radio buttons or multiselects.
Documentation
Advanced documentation and examples has now moved – find it on our Search & Filter Plugin Documentation.
Please find below limited documentation to get you started.
How To Use
To display Search & Filter all you need to do is a use a shortcode:
[searchandfilter taxonomies=”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 taxonomies=”category,post_tag”]’ ); ?>
Arguments
Examples for most of the arguments below can be found over on the Search & Filter Plugin Documentation.
Name Default Value Options Additonal Information
fields Comma seperated list of any field names and Public Taxonomies:
search
post_date
post_types
*public taxonomy names Example using all your public taxonomies (copy & paste!):
[searchandfilter taxonomies=”search,category,post_tag,post_format”]
types select Comma seperated list of any of the types found below:
select
checkbox
radio
multiselect
These types should only be used when the field is post_date
:
date
daterange The order of values in this comma seperated list needs to match the fields list.
headings Comma seperated list containing any string value. Blank values are ommited completely and the heading will not display. The order of values in this comma seperated list needs to match the fields list.
hierarchical 0 Comma seperated list.
1 – display as hierarchical
*Any other value is ignored The order of values in this comma seperated list needs to match the fields list.
hide_empty 1 Comma seperated list.
0 – Shows empty taxonomies
1 – Hides empty taxonomies
*Any other value is ignored The order of values in this comma seperated list needs to match the fields list.
order_by name Comma seperated list of the following possible values:
ID
name
slug
count
term_group
This uses the values of “orderby” as defined on the WordPress site. The order of values in this comma seperated list needs to match the fields list.
order_dir ASC Comma seperated list containing:
ASC – ascending
DESC – descending
This sets the order of taxonomies terms for a given taxonomy and can be used in conjunction with order_by
. The order of values in this comma seperated list needs to match the fields list.
post_types Comma seperated list of any post types (names) in the Public Post Types table below.
or set to:
all This can be used with or without post_type
appearing in the field list.
When post_type
appears in the field list, the post types listed here will be selectable in the post_type
field.
When post_type
does not appear in the field list, then all searches are retricted to the post types here.
class Any string Enter a class name here, or class names seperated by spaces to have them added to Search & Filter form. This allows individual styling of each Search & Filter instance.
Ommit to ignore.
submit_label Submit Any string This is the text label on the submit button.
search_placeholder Search … Any string This is the placeholder text that appears when no search term has been entered in the search field.
Name Default Value Options Additonal Information
Your Public Taxonomies
Name Label Post Types
category Categorieën post
post_tag Tags post
post_format Berichttype post
Name Label Post Types
Your Public Post Types
Note: the attachment post type is not available in this list.
Name Label
post Berichten
page Pagina’s
ccf_form Forms
ccf_submission Form Submissions
fmemailverification FM Email Verification
post_grid Post Grid
Name Label
Styling
Search & Filter uses standard inputs and selects, form elements are contained in an unordered list – styling should be easy. Please see CSS file for base styles used.
Search & Filter Prefers Clean URLs!
If any fields are submitted that have blank values they do not get added to the URL, for example, if the search box is empty when submitting, you will not find a ?s=
in the URL.
In addition to this, if permalinks are enabled, when you submit a search, Search & Filter will try to remove category_name
from the url and instead rewrites the URL to first obey a clean category URL with the rest of the query string following.
This url:
http://www.yourdomain.com/?s=searchterm&category_name=uncategorized&tag=shoes&customtaxonomy=customvalue
Becomes:
http://www.yourdomain.com/category/uncategorized/?s=searchterm&tag=shoes&customtaxonomy=customvalue
The built in WordPress rewrites wouldn’t normally handle this.
Links
Plugin Support Page & Discussion
Plugin Documentation
Plugin on WordPress.org
Plugin on Github