GD > Search
All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our Super Duper Widgets.
The GD > Search widget shows the GeoDirectory search bar. The search bar can be used search listings.
- The icons inside the search boxes can be used to clear the current values.
- The Near input can be used to filter listings closest to the position entered such as a zip code or place name.
- With the Advanced Search Extension, you can add custom field filters to the main search bar or to the advanced search section (see example section).
By default, there are no options for this widget, though some extensions add options.
If more than one CPT is detected then the below options will show.
- Default Post Type - The custom post type to show by default. Only used when there are multiple CPTs.
- Hide Post Type Selector - Hide the CPT selector (if not on the search page) this can be used to setup a specific CPT search and not give the option to change the CPT.
If the Advanced Search extension is installed the below option will show.
- Open advanced filters - Select when open / hide advanced filters. Options are; Default, Open when searched, always open.
Example with multiple custom post types and advanced search options closed.
Example with advanced search options open
What happens if a user types in the Search field and hits Search without waiting for the suggestions?
That is known as 'Near Search'. In this case, the text entered in the search field is sent to your maps provider - either Google or OSM -- and then a coordinate set is returned.
Thereafter, your site's database of locations is searched, for the radius from that point - and then the results are shown.
Optionally, you can change the Near Search radius by heading to GD > Settings > General > Search > Search Near Radius and then incrementing the value accordingly (the number denotes miles/kilometres, and a lower value yields faster results).