{"id":928,"date":"2019-10-18T21:44:52","date_gmt":"2019-10-18T21:44:52","guid":{"rendered":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/gd-search\/"},"modified":"2019-10-18T23:16:07","modified_gmt":"2019-10-18T23:16:07","slug":"gd_search","status":"publish","type":"docs","link":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/gd_search\/","title":{"rendered":"GD > Search"},"content":{"rendered":"<p><span class='bookmark-index'><br \/>\n<a href=\"#intro\">Introduction<\/a><br \/>\n<a href=\"#configure\">GD > Search Options<\/a><br \/>\n<a href=\"#options\">GD > Search Options<\/a><br \/>\n<a href=\"#settings\">Settings<\/a><br \/>\n<a href=\"#guide\">Guide<\/a><\/span><\/p>\n<h3><a id=\"intro\" href=\"#intro\">Introduction<\/a><\/h3>\n<p>GD > Search can place a new DeoDirectory Search bar anywhere you like.<\/p>\n<p>Use as a widget, shortcode, or Gutenberg block.<\/p>\n<p>This page covers options available with the GeoDirectory core plugin, as well as additional options and settings from the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/advanced-search\/\">Advanced Search Addon<\/a>, the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/custom-post-types\/\" rel=\"noopener noreferrer\" target=\"_blank\">Custom Post Types Addon<\/a>, and <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/location-manager\/\">Location Manager Addon<\/a>.<\/p>\n<h3><a id=\"configure\" href=\"#configure\">Configure<\/a><\/h3>\n<p>When designing your GD templates, you can use a widget, block, or shortcode to configure a new GD Element.<\/p>\n<p>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.<\/p>\n<p>Be sure to toggle on the advanced options, the Blue Button, to see all the options.<\/p>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/builder.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/builder.jpg\" alt=\"\" width=\"778\" height=\"337\" class=\"alignnone size-full wp-image-935\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/builder.jpg 778w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/builder-300x130.jpg 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/builder-768x333.jpg 768w\" sizes=\"(max-width: 778px) 100vw, 778px\" \/><\/a><\/p>\n<h3><a id=\"options\" href=\"#options\">GD > Search Options<\/a><\/h3>\n<li>Core Shortcode<\/li>\n<pre><code class='php'>[gd_search]<\/code><\/pre>\n<ul>\n<li><strong>Option<\/strong>\n<pre><code>post_type=\"gd_place\"<\/code><\/pre>\n<p> sets the default post type for the CPT Select Dropdown.<\/li>\n<li>Available with the Custom Post Types Addon or Events Addon<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search post_type=&quot;gd_place&quot;]<\/code><\/pre>\n<ul>\n<li><strong>Option<\/strong>\n<pre><code>post_type_hide=\"1\" <\/code><\/pre>\n<p> hides the CPT Select Dropdown.<\/li>\n<li>Available with the Custom Post Types Addon or Events Addon<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search post_type_hide=&quot;1&quot;]<\/code><\/pre>\n<ul>\n<li><strong>Option<\/strong>\n<pre><code>customize_filters=\"default\"<\/code><\/pre>\n<\/li>\n<li>Values: default, searched, always<\/li>\n<li>Available with the Advanced Search Addon<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search customize_filters=&quot;default&quot;]<\/code><\/pre>\n<h3><a href=\"#settings\" id=\"settings\">GD > Search Settings<\/a><\/h4>\n<h4>Basic Settings with GeoDirectory core plugin<\/h4>\n<p><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search<\/strong><\/p>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/basic-2.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/basic-2.jpg\" alt=\"\" width=\"600\" class=\"alignnone size-full wp-image-934\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/basic-2.jpg 934w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/basic-2-300x94.jpg 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/basic-2-768x242.jpg 768w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/><\/a><\/p>\n<h4>Advanced Search Addon Settings<\/h4>\n<p>Requires <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/advanced-search\/\" rel=\"noopener noreferrer\" target=\"_blank\">Advanced Search Filters Addon<\/a>.<br \/>\n<strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > Advanced Search <\/strong>(Tab)<\/p>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/advance-search.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/advance-search.jpg\" alt=\"\" width=\"600\" class=\"alignnone size-full wp-image-932\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/advance-search.jpg 934w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/advance-search-300x153.jpg 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/advance-search-768x392.jpg 768w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/><\/a><\/p>\n<h4>Location Manager Addon Settings<\/h4>\n<p>Requires <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/location-manager\/\" rel=\"noopener noreferrer\" target=\"_blank\">Location Manager Addon<\/a><br \/>\n<strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > Locations <\/strong>(Tab)<\/strong><br \/>\n<a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/location-manager-advanced.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/location-manager-advanced.jpg\" alt=\"\" width=\"600\" class=\"alignnone size-full wp-image-933\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/location-manager-advanced.jpg 920w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/location-manager-advanced-300x92.jpg 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/location-manager-advanced-768x235.jpg 768w\" sizes=\"(max-width: 920px) 100vw, 920px\" \/><\/a><\/p>\n<h3><a href=\"#guide\" id=\"guide\">GD > Search Visual Guide<\/a><\/h3>\n<p>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.<\/p>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/ds-gd-search.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/ds-gd-search.jpg\" alt=\"\" width=\"600\" class=\"alignnone size-full wp-image-930\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/ds-gd-search.jpg 723w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/10\/ds-gd-search-300x89.jpg 300w\" sizes=\"(max-width: 723px) 100vw, 723px\" \/><\/a><br \/>\nAbove: GD Search bar as it appears in the <a href=\"https:\/\/wpgeo.directory\/starter\/\" rel=\"noopener noreferrer\" target=\"_blank\">Directory Starter theme<\/a>.<br \/>\n<a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2018\/09\/search-cat-title-suggest.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2018\/09\/search-cat-title-suggest.jpg\" alt=\"\" width=\"287\" height=\"185\" class=\"alignnone size-full wp-image-927\" \/><\/a><br \/>\n<a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2018\/09\/search-near-suggest.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2018\/09\/search-near-suggest.jpg\" alt=\"\" width=\"289\" height=\"184\" class=\"alignnone size-full wp-image-925\" \/><\/a><br \/>\n<strong>A. Custom Post Type Drop Down<br \/>\nB. Category Select Drop Down<br \/>\nC. Search For field<br \/>\nD. Search Near Field<br \/>\nE. Search For field -> Suggestions for Category and Listing Titles<br \/>\nF. Near Search field -> Suggestions for IN and Near Search<br \/>\nG. Search Options Filters (not shown)<br \/>\n<\/strong><\/p>\n<p><strong>A. Custom Post Type Drop Down<\/strong><\/p>\n<ul>\n<li>About: Appears automatically when more than one post type is present on the site.<\/li>\n<li>Option to choose the default:\n<pre><code>post_type=\"gd_event\" <\/code><\/pre>\n<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search post_type=&quot;gd_event&quot; customize_filters=&quot;default&quot;]<\/code><\/pre>\n<ul>\n<li>Option to hide completely\n<pre><code>post_type_hide=\"1\" <\/code><\/pre>\n<p> (remember to choose a default or it will revert to gd_places)<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search post_type=&quot;gd_event&quot; post_type_hide=&quot;1&quot; customize_filters=&quot;default&quot;]<\/code><\/pre>\n<ul>\n<li>Trash\/Delete a CPT from the dropdown by deleting all categories and listings.<\/li>\n<li>Hide a single CPT from the dropdown with a <a href=\"https:\/\/wpgeodirectory.com\/support\/topic\/select-cpts-to-appear-in-search\/#post-461261\" rel=\"noopener noreferrer\" target=\"_blank\">snippet<\/a>.<\/li>\n<\/ul>\n<p><strong>B. Category Select Drop Down<\/strong><\/p>\n<ul>\n<li>About: Add a category select dropdown to the search bar to show only listings in that category.<\/li>\n<li>Add or remove the category select drop down for a CPT by following <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/advanced-search\/#select\">these instructions<\/a>.<\/li>\n<\/ul>\n<p><strong>C. Search For field<\/strong><\/p>\n<ul>\n<li>About: Keyword search. Searches through Title\/Description\/Categories\/Tags.<\/li>\n<li>Placeholder text:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search &#8211; > Search field placeholder text<\/strong><\/li>\n<\/ul>\n<li>Hide the Search For field with <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/faq\/common-examples\/#gd_search\" rel=\"noopener noreferrer\" target=\"_blank\">custom CSS<\/a>.<\/li>\n<li>Set basic options at:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search &#8211; > Search field placeholder text<\/strong><\/li>\n<\/ul>\n<li>Set Advanced Search related options at:<\/li>\n<ul>\n<li> <strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > Advanced Search <\/strong>(Tab)(requires <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/advanced-search\/\" rel=\"noopener noreferrer\" target=\"_blank\">Advanced Search Filters Addon<\/a>)<\/li>\n<\/ul>\n<\/ul>\n<p><strong>D. Search Near field<\/strong><\/p>\n<ul>\n<li>About: Search Near or In a location by entering a location name or selecting from the suggestions.<\/li>\n<li>Set the Placeholder text:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search &#8211; > Search field placeholder text<\/strong><\/li>\n<\/ul>\n<li>Hide completely with <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/faq\/common-examples\/#gd_search\" rel=\"noopener noreferrer\" target=\"_blank\">custom CSS<\/a>.\n<li>Set basic options at:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search &#8211; > Search field placeholder text<\/strong><\/li>\n<\/ul>\n<li>Set advanced Location Manager options at:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > Locations <\/strong>(Tab)(Requires <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/location-manager\/\" rel=\"noopener noreferrer\" target=\"_blank\">Location Manager Addon<\/a><\/li>\n<\/ul>\n<\/ul>\n<p><strong>E. Search For field -> Suggestions for Category and Listing Titles<\/strong><\/p>\n<ul>\n<li>About: Search field suggestions are for Categories and Post Titles.<\/li>\n<li>Show Titles only, Categories only, both, or disable with Advanced Search addon options.<\/li>\n<li>Set basic options at:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search &#8211; > Search field placeholder text<\/strong><\/li>\n<\/ul>\n<li>Set Advanced Search related options at:<\/li>\n<ul>\n<li> <strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > Advanced Search <\/strong>(Tab)(requires <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/advanced-search\/\" rel=\"noopener noreferrer\" target=\"_blank\">Advanced Search Filters Addon<\/a>)<\/li>\n<\/ul>\n<\/ul>\n<p><strong>F. Near Search field -> Suggestions for IN and Near Search<\/strong><\/p>\n<ul>\n<li>About: Search Near suggestions first recommend IN locations from your own site. Enter an address to see Near suggestions.\n<li>Hide completely with the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/location-manager\/\" rel=\"noopener noreferrer\" target=\"_blank\">Location Manager Addon<\/a>.<\/li>\n<li>Set basic options at:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > General &#8211; > Search &#8211; > Search field placeholder text<\/strong><\/li>\n<\/ul>\n<li>Set advanced Location Manager options at:<\/li>\n<ul>\n<li><strong>WP Backend &#8211; GeoDirectory &#8211; > Settings &#8211; > Locations <\/strong>(Tab)(Requires <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/location-manager\/\" rel=\"noopener noreferrer\" target=\"_blank\">Location Manager Addon<\/a><\/li>\n<\/ul>\n<\/ul>\n<p><strong>G. Search Options Filters (Drawer)<\/strong><\/p>\n<li>About: The Search Options Drawer (G) is opened with the gear icon on the search bar. The drawer holds all the Advanced Search filters you have configured for your CPT.<\/li>\n<li>The gear icon is hidden until you add Advanced Search filters to your CPT.<\/li>\n<li>After adding filters, show the drawer:<\/li>\n<li>Open when searched with an option:\n<pre><code>customize_filters=\"searched\"<\/code><\/pre>\n<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search post_type=&quot;gd_event&quot; post_type_hide=&quot;1&quot; customize_filters=&quot;searched&quot;]<\/code><\/pre>\n<ul>\n<li>Always open with an option:\n<pre><code>customize_filters=\"always\"<\/code><\/pre>\n<\/li>\n<\/ul>\n<pre><code class='php'>[gd_search post_type=&quot;gd_event&quot; post_type_hide=&quot;1&quot; customize_filters=&quot;always&quot;]<\/code><\/pre>\n","protected":false},"featured_media":0,"parent":806,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/928"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/928\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/806"}],"next":[{"title":"List and Grid Layouts","link":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/layouts\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/821"}],"prev":[{"title":"GD > Post Images","link":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/images\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/388"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/doc_tag?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}