{"id":2923,"date":"2026-10-20T08:39:20","date_gmt":"2026-10-20T07:39:20","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-map-with-filtered-listings-2\/"},"modified":"2026-10-20T08:39:20","modified_gmt":"2026-10-20T07:39:20","slug":"show-map-with-filtered-listings-2","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/show-map-with-filtered-listings-2\/","title":{"rendered":"How to show a map with filtered listings below it"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">GeoDirectory search results always load on the GD search page, so instead of filtering on the page the visitor started from, you design the search page with the search bar, map and results list in the order you want. A map on that page shows the listings in the results.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Build the search results layout<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to GeoDirectory &gt; Settings &gt; General &gt; Pages and open the page selected as Search Page.<\/li>\n\n\n\n<li>Add a GD &gt; Map block below the search bar with Map type set to Auto. On the search page this maps the current results.<\/li>\n\n\n\n<li>Keep GD &gt; Loop below the map for the list of results, with GD &gt; Loop Paging after it.<\/li>\n\n\n\n<li>Update the page.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">With shortcodes, the page looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_notifications&#093;\n&#091;gd_search&#093;\n&#091;gd_map map_type=&#039;auto&#039; width=&#039;100%&#039; height=&#039;400px&#039;&#093;\n&#091;gd_loop_actions&#093;\n&#091;gd_loop layout=2&#093;\n&#091;gd_loop_paging&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the same arrangement on the page where visitors start (search bar, a Directory map and <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-listings\/\">GD &gt; Listings<\/a>), and the search results will look like the page they came from.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add your own fields as filters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Filtering by your own custom fields needs the Advanced Search add-on. It adds fields to the search bar or to a filters panel, set up per post type. Fields with fixed choices, such as selects and checkboxes, make the best filters, so a free text field like Year works better changed to a select. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/advanced-search\/how-to-add-a-filter-to-the-main-search-bar\/\">How to add a filter to the main search bar<\/a> and <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/advanced-search\/how-to-add-a-filter-to-the-advanced-search-filters\/\">How to add a filter to the Advanced Search filters<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose what each result shows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The fields shown for each listing in the results come from the archive item template, the page set as Archive item page under GeoDirectory &gt; Settings &gt; General &gt; Pages. Add GD &gt; Post Meta blocks for the fields you want and remove the ones you don&#8217;t.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Filtering the map without a page load<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you only need to filter the markers, the Directory map has &#8220;Enable search filter?&#8221;, &#8220;Enable category filter?&#8221; and &#8220;Enable post type filter?&#8221; options. These change the markers on the map itself and leave any listings block on the page as it is.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GeoDirectory search results always load on the GD search page, so instead of filtering on the page the visitor started from, you design the search page with the search bar, map and results list in the order you want. A map on that page shows the listings in the results. Build the search results layout [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2923","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-how-tos"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2923"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2923\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2923"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2923"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}