GD > Search
Introduction
GD > Search Options
GD > Search Options
Settings
Guide
Introduction
GD > Search can place a new DeoDirectory Search bar anywhere you like.
Use as a widget, shortcode, or Gutenberg block.
This page covers options available with the GeoDirectory core plugin, as well as additional options and settings from the Advanced Search Addon, the Custom Post Types Addon, and Location Manager Addon.
Configure
When designing your GD templates, you can use a widget, block, or shortcode to configure a new GD Element.
If you use shortcodes, be sure to use the shortcode builder. By using the shortcode builder you will always have the latest options and be sure to avoid any errors that might occur when copying and pasting code snippets.
Be sure to toggle on the advanced options, the Blue Button, to see all the options.
GD > Search Options
[gd_search]
- Option
post_type="gd_place"
sets the default post type for the CPT Select Dropdown.
- Available with the Custom Post Types Addon or Events Addon
[gd_search post_type="gd_place"]
- Option
post_type_hide="1"
hides the CPT Select Dropdown.
- Available with the Custom Post Types Addon or Events Addon
[gd_search post_type_hide="1"]
- Option
customize_filters="default"
- Values: default, searched, always
- Available with the Advanced Search Addon
[gd_search customize_filters="default"]
GD > Search Settings
Basic Settings with GeoDirectory core plugin
WP Backend – GeoDirectory – > Settings – > General – > Search
Advanced Search Addon Settings
Requires Advanced Search Filters Addon.
WP Backend – GeoDirectory – > Settings – > Advanced Search (Tab)
Location Manager Addon Settings
Requires Location Manager Addon
WP Backend – GeoDirectory – > Settings – > Locations (Tab)
GD > Search Visual Guide
There are several places in the settings where you can make changes to how the search bar behaves, as well as custom CSS and PHP snippets that you can use to hide one or more fields.
Above: GD Search bar as it appears in the Directory Starter theme.
A. Custom Post Type Drop Down
B. Category Select Drop Down
C. Search For field
D. Search Near Field
E. Search For field -> Suggestions for Category and Listing Titles
F. Near Search field -> Suggestions for IN and Near Search
G. Search Options Filters (not shown)
A. Custom Post Type Drop Down
- About: Appears automatically when more than one post type is present on the site.
- Option to choose the default:
post_type="gd_event"
[gd_search post_type="gd_event" customize_filters="default"]
- Option to hide completely
post_type_hide="1"
(remember to choose a default or it will revert to gd_places)
[gd_search post_type="gd_event" post_type_hide="1" customize_filters="default"]
- Trash/Delete a CPT from the dropdown by deleting all categories and listings.
- Hide a single CPT from the dropdown with a snippet.
B. Category Select Drop Down
- About: Add a category select dropdown to the search bar to show only listings in that category.
- Add or remove the category select drop down for a CPT by following these instructions.
C. Search For field
- About: Keyword search. Searches through Title/Description/Categories/Tags.
- Placeholder text:
- WP Backend – GeoDirectory – > Settings – > General – > Search – > Search field placeholder text
- Hide the Search For field with custom CSS.
- Set basic options at:
- WP Backend – GeoDirectory – > Settings – > General – > Search – > Search field placeholder text
- Set Advanced Search related options at:
- WP Backend – GeoDirectory – > Settings – > Advanced Search (Tab)(requires Advanced Search Filters Addon)
D. Search Near field
- About: Search Near or In a location by entering a location name or selecting from the suggestions.
- Set the Placeholder text:
- WP Backend – GeoDirectory – > Settings – > General – > Search – > Search field placeholder text
- Hide completely with custom CSS.
- Set basic options at:
- WP Backend – GeoDirectory – > Settings – > General – > Search – > Search field placeholder text
- Set advanced Location Manager options at:
- WP Backend – GeoDirectory – > Settings – > Locations (Tab)(Requires Location Manager Addon
E. Search For field -> Suggestions for Category and Listing Titles
- About: Search field suggestions are for Categories and Post Titles.
- Show Titles only, Categories only, both, or disable with Advanced Search addon options.
- Set basic options at:
- WP Backend – GeoDirectory – > Settings – > General – > Search – > Search field placeholder text
- Set Advanced Search related options at:
- WP Backend – GeoDirectory – > Settings – > Advanced Search (Tab)(requires Advanced Search Filters Addon)
F. Near Search field -> Suggestions for IN and Near Search
- About: Search Near suggestions first recommend IN locations from your own site. Enter an address to see Near suggestions.
- Hide completely with the Location Manager Addon.
- Set basic options at:
- WP Backend – GeoDirectory – > Settings – > General – > Search – > Search field placeholder text
- Set advanced Location Manager options at:
- WP Backend – GeoDirectory – > Settings – > Locations (Tab)(Requires Location Manager Addon
G. Search Options Filters (Drawer)
customize_filters="searched"
[gd_search post_type="gd_event" post_type_hide="1" customize_filters="searched"]
- Always open with an option:
customize_filters="always"
[gd_search post_type="gd_event" post_type_hide="1" customize_filters="always"]