Plugin Directory

Changeset 2420108


Ignore:
Timestamp:
11/17/2020 02:51:10 PM (5 years ago)
Author:
marcus.downing
Message:

Improved performance with Relevanssi

Location:
bang-faceted-search/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bang-faceted-search/trunk/main.php

    r2419997 r2420108  
    44Plugin URI: http://www.bang-on.net/
    55Description: Create a faceted search interface for any post type.
    6 Version: 1.3
     6Version: 2.0
    77Author: Marcus Downing
    88Contributors: marcus.downing, diddledan
  • bang-faceted-search/trunk/readme.txt

    r2419997 r2420108  
    33Tags: search
    44Requires at least: 3.7
    5 Tested up to: 3.9.1
     5Tested up to: 5.5.0
    66Stable tag: trunk
    77License: GPLv2 or later
     
    1212== Description ==
    1313
    14 A faceted search is one that allows you to drill down by various fields:
    15 price, size, colour, shipping location etc.
    16 It complements a free text search rather than replaces it.
     14A faceted search is one that allows you to drill down by various fields: price, size, colour, shipping location etc. It complements a free text search rather than replaces it.
    1715
    18 Using this plugin, you can create a faceted search interface for your pages and posts,
    19 or any other custom post type. You can add "facets" for:
     16Using this plugin, you can create a faceted search interface for your pages, posts, or any other custom post type. You can add "facets" for:
    2017
    2118*  Taxonomies
     
    2623These facets are widgets that can be easily changed in the admin interface.
    2724
     25You can have multiple search pages for different post types. If your WordPress installation uses multi-site, you can search across the different sites.
     26
    2827
    2928== Installation ==
     
    32311. Activate the plugin through the 'Plugins' menu in WordPress
    33321. Create a template `search.php` in your theme
     331. Go to Settings > Faceted Search to set up your search pages.
     34
     35= Creating a search page =
     36
     37By default, you'll have a single search address, at the site root `/`. This lines up with WordPress search.
     38
     39In the WordPress admin adrea, go to Settings > Faceted Search. At the top is
     40
     41
    3442
    3543= Creating a search template =
    3644
    37 You need to create a search template in your theme called `search.php`.
    38 This template will be used whenever the user searches your site.
     45You need to create a search template in your theme called `search.php`, if you don't already have one. This template will be used whenever the user searches your site. You can have more than one search template, each.
    3946
    4047Add this code to your `functions.php` to create a search-specific sidebar:
     
    4956`<?php dynamic_sidebar('search'); ?>`
    5057
    51 Then in the admin interface, drag Facet widgets into that sidebar to add, customise
    52 and re-order the search widgets for your site.
     58Then in the admin interface, drag Facet widgets into that sidebar to add, customise and re-order the search widgets for your site.
    5359
    5460= Customising the faceted search =
    5561
    56 Your site can have more than the default search page, and you can use the
    57 faceted search plugin to search custom post types.
     62Your site can have more than the default search page, and you can use the faceted search plugin to search custom post types.
    5863
    59 To make a custom search, create a page with a custom template in your theme.
    60 For example, if you have a page called `/products`, then create a template
    61 in your theme called `products.php`.
    62 Near the start of this template, call this code:
     64To make a custom search, create a page with a custom template in your theme. For example, if you have a page called `/products`, then create a template in your theme called `products.php`. Near the start of this template, call this code:
    6365
    6466`$faceted_search = bang_faceted_search(null, array(
     
    9395Nothing, but faceted search makes your search richer.
    9496
    95 Faceted search doesn't replace the normal search field, it complements it.
    96 You can have both, without any boundary between them.
     97Faceted search doesn't replace the normal search field, it complements it. You can have both, without any boundary between them.
    9798
    9899= What's a "facet"? =
    99100
    100 It's a means of narrowing down search results.
    101 A user might want to narrow down by categories or tags, by the author of a post,
    102 by the date it was published or by the contents of a taxonomy or custom field.
    103 
    104 = Where's the admin settings page? =
    105 
    106 There isn't one.
    107 
    108 This plugin is mainly intended for theme developers.
    109 You need to be able to build a theme with specific code in its
    110 templates to use this plugin properly.
    111 
    112 The options you can control in the admin panel are the current set of widgets.
     101It's a means of narrowing down search results. A user might want to narrow down by categories or tags, by the author of a post, by the date it was published or by the contents of a taxonomy or custom field.
    113102
    114103= Why don't I see any faceted search links? =
     
    116105Make sure to create a search sidebar, and put some widgets into it.
    117106
    118 If a facet widget has the **Hide empty terms** option checked,
    119 then that facet may easily disappear from a view when all its links
    120 would produce zero results.
     107If a facet widget has the **Hide empty terms** option checked, then that facet may easily disappear from a view when all its links would produce zero results.
    121108
    122109= Can I put other widgets into the same sidebar as the facet widgets? =
     
    130117= Does this work with Relevanssi? =
    131118
    132 Yes. If you have the Relevanssi plugin switched on at the same time,
    133 they'll cooperate to deliver the best search results.
     119Yes. If you have the Relevanssi plugin switched on at the same time, they'll cooperate to deliver the best search results.
    134120
    135121= Does this work with my eCommerce/calendar/reviews/other plugin? =
    136122
    137 You can make a faceted search on any post type,
    138 but it won't understand any special fields like 'price' or 'score' if they're
    139 implemented in a non-standard way.
     123You can make a faceted search on any post type, but it won't understand any special fields like 'price' or 'score' if they're implemented in a non-standard way.
    140124
    141125= Can I make my own facets? Can I filter the results? Can I change how the plugin works? =
     
    143127Yes, yes and yes.
    144128
    145 If you use a plugin that defines its own post types, such as an ecommerce or
    146 events calendar plugin, then you might want to make your own facet widgets.
    147 Create a WordPress widget and register it in the normal way. To act as a faceted
    148 Look at the code of the included widgets to get an idea how to implement the links.
     129If you use a plugin that defines its own post types, such as an ecommerce or events calendar plugin, then you might want to make your own facet widgets. Create a WordPress widget and register it in the normal way. Look at the code of the included widgets to get an idea how to implement the links.
    149130
    150 There are a lot more actions and filters you can hook into -
    151 have a look through the code to find them. Here are just a few of them:
     131There are a lot more actions and filters you can hook into - have a look through the code to find them. Here are just a few of them:
    152132
    153133*  `bang_fs_query` - The parameters to `WP_Query`
     
    157137*  `bang_fs_options` - The plugin settings
    158138
    159 Be aware that the internal workings of the plugin are subject to change,
    160 so the names and details of these hooks may change in future version.
     139Be aware that the internal workings of the plugin are subject to change, so the names and details of these hooks may change in future version.
    161140
    162141== Changelog ==
Note: See TracChangeset for help on using the changeset viewer.