The Search aspect of Business Directory is broken into two parts:
- The Quick Search Field, located at the top of most pages in the directory with a Search button
- The Advanced Search Modal, which is a pop-up that is opened when the user clicks on the Advanced Search icon
How Quick Search Works
The Quick Search box is the search box on the front page of your directory (typically). It uses a keyword search function, and it will search only the titles of the listings by default. If no fields are selected, the following fields will be searched in Quick Searches: Listing Title, Short Description (as excerpt), and Description (as content).
You can set this feature to search for data in additional fields by making those selections under Directory → Settings → Listings→ Searching (your list of available fields may look different from the ones pictured):
A best practice would be to choose only those fields to search where you think the most relevant search terms will be located. Usually, those are long and short description boxes, as well as the title.
Choosing too many fields for inclusion in Quick Search can slow search performance.
How Advanced Search Works
By contrast, the Advanced Search modal has more options for searching, and when you enter data into any of the fields, the data will only be matched against that field. For example, if you enter a value in the Short Description field, no other field will be searched for that value.
Advanced Search from the demo can be accessed here and looks like this:
If you enter a value in both the Short Description and Listing Title fields, the search will be for all listings that match the value in Short Description AND the value in Title.
Advanced Search is designed to allow fine-grained control of search results. The Quick Search is a quick-and-dirty search mechanism to find the most common data in the three most heavily used fields. We avoid searching all fields for these keywords, as this would have a negative performance impact on directories with large listing counts.
Customizing Advanced Search
You can control the fields that appear in your Advanced Search Form in the form fields themselves. Fields with the option checked “Include this field in the search form?” will appear in the Advanced Search form.
You can add or exclude a field on the Advanced Search modal in the form field settings themselves, under Directory → Directory Content → Form Fields by editing the Field Display Options for each field. To exclude a field from the Advanced Search form, uncheck this option in the field settings:
Listings that are featured will show up in the list of results at the top and may appear differently than other listings, based on your settings.
You can display the Quick Search Box on any page using the Quick Search Shortcode.
You can display the Quick Search Box on any page using the Advanced Search Shortcode.
Business Directory Plugin comes with a search widget for listings in the plugin. It can be added wherever your theme allows for widgets. Find the widget under Appearance > Widgets in WordPress:
Basic Search Widget
You can simply select “Done” on this screen if you want to add a simple search widget for your directory. Here are those settings:
And here is the result on the site:
Advanced Search Widget
If you want to add additional fields to be searched, you would choose the Advanced Search button and select multiple fields to be searched. You can select more than one field by holding down the Ctrl or Cmd button on your keyboard while making those selections:
And here is what that looks like on the front end:
You can have dropdown fields and checkbox fields here as well. You would just need to adjust the field type in the Form Fields section of the plugin.
NOTE: These search widgets only search Business Directory Plugin listings and not the entire site.
Note for users of both the Regions Module and the ZIP Search Module:
You can choose to enable the Regions Module on the Quick Search menu, which adds the Located at <City, State> search field OR you can choose to enable the ZIP Search Module on the Quick Search menu, which adds a ZIP code field to the Quick Search.
Here is what the ZIP Search Module looks like when it is enabled on the Quick Search Menu:
If you have enabled both modules in the Quick Search bar, then the Regions Module will take precedence. Only one of those options can be added to the Quick Search Bar, so you must make a choice between the two modules here.