{"id":21903,"date":"2013-02-08T09:42:45","date_gmt":"2013-02-08T09:42:45","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/facetious\/"},"modified":"2013-04-12T17:25:29","modified_gmt":"2013-04-12T17:25:29","slug":"facetious","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/facetious\/","author":42547,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.4","stable_tag":"trunk","tested":"3.5.2","requires":"3.4","requires_php":"","requires_plugins":"","header_name":"Facetious Search","header_author":"Code for the People","header_description":"","assets_banners_color":"","last_updated":"2013-04-12 17:25:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/cftp\/facetious","header_author_uri":"http:\/\/codeforthepeople.com\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":11127,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.1.4":"<ul>\n<li>Remove some PHP 5.3-specific code to avoid a fatal error when running PHP 5.2.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"11"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"665128","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"665128","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"665128","resolution":"3","location":"assets"}},"screenshots":{"1":"A faceted search form in action","2":"A customised faceted search form","3":"The widget options panel"}},"plugin_section":[],"plugin_tags":[4435,28920,28913,944],"plugin_category":[],"plugin_contributors":[77921,78232,81107,77763],"plugin_business_model":[],"class_list":["post-21903","plugin","type-plugin","status-closed","hentry","plugin_tags-advanced-search","plugin_tags-faceted","plugin_tags-faceted-search","plugin_tags-search","plugin_contributors-codeforthepeople","plugin_contributors-johnbillion","plugin_contributors-s1m0nd","plugin_contributors-simonwheatley","plugin_committers-johnbillion","plugin_committers-s1m0nd","plugin_committers-simonwheatley"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/facetious.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/facetious\/assets\/screenshot-1.png?rev=665128","caption":"A faceted search form in action"},{"src":"https:\/\/ps.w.org\/facetious\/assets\/screenshot-2.png?rev=665128","caption":"A customised faceted search form"},{"src":"https:\/\/ps.w.org\/facetious\/assets\/screenshot-3.png?rev=665128","caption":"The widget options panel"}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>A Facetious form can include dropdown lists of:<\/p>\n\n<ul>\n<li>Taxonomy terms (tags, categories, and custom taxonomies)<\/li>\n<li>Months<\/li>\n<li>Plus a conventional search input box<\/li>\n<\/ul>\n\n<p>You can also restrict searches by post type <em>(singular)<\/em>, if you so desire.<\/p>\n\n<p>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 <code>?s=polly&amp;post_type=pet&amp;category=bird<\/code>. (You don't even have to display a faceted search form on your site to benefit from these, by the way).<\/p>\n\n<p>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.<\/p>\n\n<h4>About<\/h4>\n\n<p>Facetious is a product of <a href=\"http:\/\/codeforthepeople.com\">Code For The People Ltd<\/a>, and is based on work done during 2012 on behalf of several UK public sector clients, among them:<\/p>\n\n<ul>\n<li>The <a href=\"http:\/\/commissionondevolutioninwales.independent.gov.uk\">Commission on Devolution in Wales<\/a><\/li>\n<li>The <a href=\"http:\/\/www.nao.org.uk\">National Audit Office<\/a>; and<\/li>\n<li>The Department for Culture, Media and Sport through its <a href=\"http:\/\/goc2012.culture.gov.uk\">Government Olympic Communication<\/a> site<\/li>\n<\/ul>\n\n<p>... which is why we're keen to offer it for wider public use.<\/p>\n\n<p><a href=\"http:\/\/github.com\/cftp\/facetious\">Fork me on GitHub!<\/a><\/p>\n\n<h4>Usage<\/h4>\n\n<p>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.<\/p>\n\n<h4>Advanced Usage<\/h4>\n\n<p>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.<\/p>\n\n<p>The main template function for outputting a Facetious search form is <code>facetious( $args )<\/code>. If you want to ensure the site doesn't break if the Facetious plugin is deactivated, you can use <code>do_action( 'facetious', $args );<\/code> instead.<\/p>\n\n<p>'$args' is an array of arguments thus:<\/p>\n\n<ul>\n<li><code>submit<\/code> - string  - The text for the submit button.<\/li>\n<li><code>echo<\/code>   - boolean - Whether to echo the form out or not.<\/li>\n<li><code>class<\/code>  - string  - The class name for the form.<\/li>\n<li><code>id<\/code>     - string  - The ID attribute for the form.<\/li>\n<li><code>fields<\/code> - array   - A list of fields to show in the form. See below.<\/li>\n<\/ul>\n\n<p>Each item in the 'fields' array can be either:<\/p>\n\n<ul>\n<li>A string name of a taxonomy<\/li>\n<li>An array of details for the field (see below)<\/li>\n<li>One of <code>s<\/code>, <code>m<\/code> or <code>pt<\/code> for the keyword search input, month dropdown and post type dropdown respectively<\/li>\n<\/ul>\n\n<p>For each field specified as an array you can specify:<\/p>\n\n<ul>\n<li><code>label<\/code>   - string - The descriptive text for this field. Defaults to the name of the taxonomy, or 'All types' for post types..<\/li>\n<li><code>class<\/code>   - string - The class name for the field.<\/li>\n<li><code>id<\/code>      - string - The ID attribute for the field.<\/li>\n<li><code>all<\/code>     - string - The \"All items\" text for this field. Defaults to the 'all_items' label of the taxonomy.<\/li>\n<li><code>options<\/code> - array  - For a taxonomy provide an array with the term slug as the key and the term name as the value, e.g. <code>array( 'term-1' =&gt; 'Term 1', 'term-2' =&gt; 'Term 2' );<\/code>, for post type supply an array of post type names.<\/li>\n<\/ul>\n\n<p>Example 1:<\/p>\n\n<pre><code>do_action( 'facetious', array(\n    'submit' =&gt; 'Search',\n    'fields' =&gt; array(\n        's',\n        'category',\n        'custom_tax_1',\n        'custom_tax_2'\n    )\n) );\n<\/code><\/pre>\n\n<p>Example 2:<\/p>\n\n<pre><code>do_action( 'facetious', array(\n    'submit' =&gt; 'Search',\n    'fields' =&gt; array(\n        's',\n        'custom_tax_1' =&gt; array(\n            'label' =&gt; 'Select an option',\n            'class' =&gt; 'my_tax_class',\n            'id'    =&gt; 'my_tax_id',\n            'all'   =&gt; 'All terms'\n        )\n        'custom_tax_2',\n        'm'\n    )\n) );\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>You can install this plugin directly from your WordPress dashboard:<\/p>\n\n<ol>\n<li>Go to the <em>Plugins<\/em> menu and click <em>Add New<\/em>.<\/li>\n<li>Search for <em>Facetious<\/em>.<\/li>\n<li>Click <em>Install Now<\/em> next to the <em>Facetious<\/em> plugin.<\/li>\n<li>Activate the plugin.<\/li>\n<\/ol>\n\n<p>Alternatively, see the guide to <a href=\"http:\/\/codex.wordpress.org\/Managing_Plugins#Manual_Plugin_Installation\">Manually Installing Plugins<\/a>.<\/p>\n\n<h4>Usage<\/h4>\n\n<p>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.<\/p>\n\n<p>Please see the full plugin description for advanced usage.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Does this plugin play nicely with WPML?<\/dt>\n<dd><p>Yep.<\/p><\/dd>\n<dt>Where can I help out with development?<\/dt>\n<dd><p><a href=\"http:\/\/github.com\/cftp\/facetious\">Fork me on GitHub!<\/a> We welcome pull requests.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.4<\/h4>\n\n<ul>\n<li>Remove some PHP 5.3-specific code to avoid a fatal error when running PHP 5.2.<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Avoid some encoding and slashing issues.<\/li>\n<li>Add some basic default stlying to fields in the Facetious widget.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Introduce an accepted value in the fields to display a post type dropdown<\/li>\n<li>Add documentation for use of <code>options<\/code> value in a field for either post type or taxonomy<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Avoid double slashes in URLs when using WPML<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Introduce an 'options' argument for taxonomies in the template function<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Avoid a WPML redirection bug.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Facetious lets you add a faceted - often called an &#039;advanced&#039; - search form to your WordPress website.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/21903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=21903"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/johnbillion"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=21903"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=21903"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=21903"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=21903"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=21903"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=21903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}