Changeset 2420108
- Timestamp:
- 11/17/2020 02:51:10 PM (5 years ago)
- Location:
- bang-faceted-search/trunk
- Files:
-
- 2 edited
-
main.php (modified) (1 diff)
-
readme.txt (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bang-faceted-search/trunk/main.php
r2419997 r2420108 4 4 Plugin URI: http://www.bang-on.net/ 5 5 Description: Create a faceted search interface for any post type. 6 Version: 1.36 Version: 2.0 7 7 Author: Marcus Downing 8 8 Contributors: marcus.downing, diddledan -
bang-faceted-search/trunk/readme.txt
r2419997 r2420108 3 3 Tags: search 4 4 Requires at least: 3.7 5 Tested up to: 3.9.15 Tested up to: 5.5.0 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 12 12 == Description == 13 13 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. 14 A 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. 17 15 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: 16 Using this plugin, you can create a faceted search interface for your pages, posts, or any other custom post type. You can add "facets" for: 20 17 21 18 * Taxonomies … … 26 23 These facets are widgets that can be easily changed in the admin interface. 27 24 25 You can have multiple search pages for different post types. If your WordPress installation uses multi-site, you can search across the different sites. 26 28 27 29 28 == Installation == … … 32 31 1. Activate the plugin through the 'Plugins' menu in WordPress 33 32 1. Create a template `search.php` in your theme 33 1. Go to Settings > Faceted Search to set up your search pages. 34 35 = Creating a search page = 36 37 By default, you'll have a single search address, at the site root `/`. This lines up with WordPress search. 38 39 In the WordPress admin adrea, go to Settings > Faceted Search. At the top is 40 41 34 42 35 43 = Creating a search template = 36 44 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. 45 You 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. 39 46 40 47 Add this code to your `functions.php` to create a search-specific sidebar: … … 49 56 `<?php dynamic_sidebar('search'); ?>` 50 57 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. 58 Then in the admin interface, drag Facet widgets into that sidebar to add, customise and re-order the search widgets for your site. 53 59 54 60 = Customising the faceted search = 55 61 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. 62 Your site can have more than the default search page, and you can use the faceted search plugin to search custom post types. 58 63 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: 64 To 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: 63 65 64 66 `$faceted_search = bang_faceted_search(null, array( … … 93 95 Nothing, but faceted search makes your search richer. 94 96 95 Faceted search doesn't replace the normal search field, it complements it. 96 You can have both, without any boundary between them. 97 Faceted search doesn't replace the normal search field, it complements it. You can have both, without any boundary between them. 97 98 98 99 = What's a "facet"? = 99 100 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. 101 It'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. 113 102 114 103 = Why don't I see any faceted search links? = … … 116 105 Make sure to create a search sidebar, and put some widgets into it. 117 106 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. 107 If 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. 121 108 122 109 = Can I put other widgets into the same sidebar as the facet widgets? = … … 130 117 = Does this work with Relevanssi? = 131 118 132 Yes. If you have the Relevanssi plugin switched on at the same time, 133 they'll cooperate to deliver the best search results. 119 Yes. If you have the Relevanssi plugin switched on at the same time, they'll cooperate to deliver the best search results. 134 120 135 121 = Does this work with my eCommerce/calendar/reviews/other plugin? = 136 122 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. 123 You 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. 140 124 141 125 = Can I make my own facets? Can I filter the results? Can I change how the plugin works? = … … 143 127 Yes, yes and yes. 144 128 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. 129 If 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. 149 130 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: 131 There 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: 152 132 153 133 * `bang_fs_query` - The parameters to `WP_Query` … … 157 137 * `bang_fs_options` - The plugin settings 158 138 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. 139 Be 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. 161 140 162 141 == Changelog ==
Note: See TracChangeset
for help on using the changeset viewer.