{"id":761,"date":"2025-03-24T14:27:37","date_gmt":"2025-03-24T14:27:37","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/gd-loop\/"},"modified":"2025-04-03T15:23:57","modified_gmt":"2025-04-03T14:23:57","slug":"gd-loop","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-loop\/","title":{"rendered":"GD > Loop"},"content":{"rendered":"<section class=\"alert alert-success dashed\">\n\t All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/what-makes-geodirectory-widgets-special\/\">Super Duper Widgets<\/a>.<\/section>\n<section class=\"alert alert-danger\">\n\t This is a <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/what-is-a-template-widget\/\"> template widget<\/a> and should only ever be used on the <strong>GD Archive template<\/strong> page.<\/section>\n<p>\n\t The Loop widget&nbsp;is what is used to&nbsp;<strong>display the loop of posts<\/strong> for such pages as <strong>Categories, Tags<\/strong> and <strong>root CPT page types<\/strong>.&nbsp; It is used almost exclusively on the&nbsp;<strong>GD Archive page template.<\/strong><\/p>\n<p>\n\tBeing a widget this means the&nbsp;<strong>main loop can be placed anywhere on the page<\/strong> and content can be placed above or below it.&nbsp; This also makes it <strong>page builder compatible<\/strong>.&nbsp;<\/p>\n<h2>Widget Options<\/h2>\n<section class=\"alert alert-info\">\n\t All settings for this widget are advanced settings, reveal them by clicking the button next to save.<\/section>\n<ul>\n<li> <strong>Layout<\/strong> &#8211; This will set the default layout for the listings. You can have Grid view 1,2,3,4,5 or list view. The <strong>GD &gt; Loop Actions<\/strong> widget gives the <strong>user the ability to switch the layout to their own preference<\/strong>.<\/li>\n<\/ul>\n<h2>Template Page Example<\/h2>\n<p>\n\tAs a shortcode:<\/p>\n<p>\n\t<img width=\"367\" height=\"189\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-ZPTU0YZAi2.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-ZPTU0YZAi2.png 367w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-ZPTU0YZAi2-300x154.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><\/p>\n<h2>Example Output<\/h2>\n<p>\n\t<img width=\"625\" height=\"442\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-uIID3kfjDo.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-uIID3kfjDo.png 625w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-uIID3kfjDo-300x212.png 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our Super Duper Widgets. This is a template widget and should only ever be used on the GD Archive template page. The Loop widget&nbsp;is what is used to&nbsp;display the loop of posts for such pages as Categories, Tags and root CPT page types.&nbsp; It [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[213,422],"class_list":["post-761","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-extensions-features","gd_placecategory-core-widgets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/761","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"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/761\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=761"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}