{"id":2466,"date":"2026-10-20T08:33:27","date_gmt":"2026-10-20T07:33:27","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-listings-in-a-grid-by-default\/"},"modified":"2026-10-20T08:55:10","modified_gmt":"2026-10-20T07:55:10","slug":"show-listings-in-a-grid-by-default","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/show-listings-in-a-grid-by-default\/","title":{"rendered":"How to show listings in a grid or two columns by default"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The layout of GeoDirectory archive and search results pages is set on the GD &gt; Loop block (the <code>&#091;gd_loop&#093;<\/code> shortcode) in your archive template. Its Layout option takes a number: 0 is the list view and 1 to 5 is a grid with that many columns. The default is a two column grid.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to GeoDirectory &gt; Settings &gt; General &gt; Pages and see which page is set as the Archive page.<\/li>\n\n\n\n<li>Edit that page and select the GD &gt; Loop block.<\/li>\n\n\n\n<li>Set Layout to the view you want, for example Grid View (Two Columns). In a shortcode that is <code>&#091;gd_loop layout=&quot;2&quot;&#093;<\/code>.<\/li>\n\n\n\n<li>Update the page and check an archive page on your site.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The number of columns applies on wider screens. On phones the listings stack in a single column, so you do not need extra CSS for mobile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you use different templates per post type, change the GD &gt; Loop block on each one. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/custom-post-types-extension\/creating-different-templates-for-custom-post-types\/\">Creating different templates for custom post types<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why some visitors still see a different layout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The GD &gt; Loop Actions block shows a view selector next to the sort options. When a visitor picks a view, their browser remembers it, and that choice wins over your default on their next visit. Saving the GD &gt; Loop settings as an admin clears your own remembered choice so you can see the change, but other visitors keep theirs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stop visitors changing the layout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the GD &gt; Loop Actions block, use Hide Layouts to hide every layout except the one you want. For example, to allow only the two column grid:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_loop_actions hide_layouts=&quot;0,1,3,4,5&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To remove the view selector completely and keep the sort options, add this CSS:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-css\">.gd-list-view-select {\n\tdisplay: none;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">All the GD &gt; Loop options are listed in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-loop\/\">GD &gt; Loop<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The layout of GeoDirectory archive and search results pages is set on the GD &gt; Loop block (the &#091;gd_loop&#093; shortcode) in your archive template. Its Layout option takes a number: 0 is the list view and 1 to 5 is a grid with that many columns. The default is a two column grid. The number [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2466","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\/2466","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=2466"}],"version-history":[{"count":2,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2466\/revisions"}],"predecessor-version":[{"id":2723,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2466\/revisions\/2723"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2466"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2466"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}