{"id":713,"date":"2019-04-17T13:28:52","date_gmt":"2019-04-17T13:28:52","guid":{"rendered":"https:\/\/wpgeodirectory.com\/docs-v2\/archive-page-template\/"},"modified":"2019-09-11T13:40:41","modified_gmt":"2019-09-11T13:40:41","slug":"archive","status":"publish","type":"docs","link":"https:\/\/wpgeodirectory.com\/docs-v2\/templates\/archive\/","title":{"rendered":"Archive Page Template"},"content":{"rendered":"<style>\nh5 {\n  font-size: 1.2em;\n  font-weight: bold;\n  margin-top: 5px;\n  margin-bottom: 15px;\n}\nblockquote.gd-faq h5 {\n    display: block;\n    margin-top: 5px;\n    margin-bottom: 15px;\n    margin-left: -10px;\n    padding: 0px;\n    border: 1px solic #cccccc;\n    width: 100%;\n    color: #393939;\n    text-decoration: underline;\n}\nblockquote.gd-faq h5 a {\n    color: #393939;\n}\nblockquote.gd-faq {\n  padding: 15px!important;\n  margin: 20px!important;\n  border: 1px solid #cccccc !important;\n  background-color: #ffffff!important;\n  border-left: 10px solid #FFF7F3 !important;\n  10px 10px 10px -10px #cccccc !important;\n  border-radius: 0px 4px 4px 0px;\n}\n<\/style>\n<div class=\"embed-responsive embed-responsive-16by9\"><iframe title=\"GeoDirectory v2 design customization with Gutenberg, Elementor, Beaver Builder, Divi and more\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/o8zgcNwNKyY?feature=oembed&amp;wmode=opaque\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/div>\n<p><span class='bookmark-index'><br \/>\n<a href=\"#intro\">Introduction<\/a><br \/>\n<a href=\"#troubleshooting\">Troubleshooting<\/a><br \/>\n<a href=\"#faq\">Frequently Asked Questions<\/a><br \/>\n<a href=\"#support\">Support<\/a><br \/>\n<\/span><\/p>\n<h3><a name=\"intro\" href=\"#intro\">Introduction<\/a><\/h3>\n<h4>What<\/h4>\n<p>The Archive template is a WordPress page. The contents of the page are the GeoDirectory Elements that are used to display listings. The Archive page template shows lists of listings with the GD Loop Design Element. The Archive template is used on Custom Post Type Archives like \/places\/ as well as Custom Post Types Category archives like \/places\/category\/attractions\/. <\/p>\n<p>Inside the template you will find default Elements that are installed with GD including GD Loop, GD Loop Actions, and GD Loop Paging. Each of these Elements is responsible for showing one specific feature.<\/p>\n<p>Every time a listing is viewed on the frontend, the contents of the GD Archive template are queried, and each Element is rendered with the data of the listing at the URL being viewed.<\/p>\n<p>The &#8216;mini listings&#8217; shown by GD Loop are based on the Archive Item template. You can find the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/templates\/archive-item\/\">Archive Item doc here<\/a>.<\/p>\n<h4>Where<\/h4>\n<p>The GD Archive template is a WordPress page that is installed with GeoDirectory.<br \/>\nYou can find the page by searching in the the Pages on your site in:<\/p>\n<p><strong>WordPress Backend &#8211; Pages &#8211; Search &#8220;gd&#8221;<\/strong> &#8211; Find the page titles GD Archive, hover, and then edit the page.<\/p>\n<h4>Examples<\/h4>\n<p>Directory Starter &#8211; <a href=\"https:\/\/wpgeo.directory\/starter\/places\/\" rel=\"noopener\" target=\"_blank\">https:\/\/wpgeo.directory\/starter\/places\/<\/a><br \/>\nSupreme Directory &#8211; <a href=\"https:\/\/wpgeo.directory\/supreme-directory\/places\/\" rel=\"noopener\" target=\"_blank\">https:\/\/wpgeo.directory\/supreme-directory\/places\/<\/a><\/p>\n<h3>GeoDirectory Settings<\/h3>\n<h4>Default Template Setting<\/h4>\n<p>Choose the default GD Archive template in the Pages settings:<\/p>\n<p><strong>GeoDirectory &#8211; Settings &#8211; General &#8211; Pages &#8211; Detail template &#8211; Choose your template page<\/strong><\/p>\n<h4>Custom Post Types Archive Template Override<\/h4>\n<p>When using the Custom Post Type addon, it is possible to set a different Archive template for each Custom Post Type (CPT). The setting for this is found in:<\/p>\n<p><strong>CPT Settings (ex. Places Settings) &#8211; General (tab) &#8211; Show Advanced &#8211; Archive template &#8211; Choose your template page<\/strong><\/p>\n<h4>Permalinks<\/h4>\n<p>Adjust the URL pattern for your archive pages. You can read more about <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/geodirectory\/settings\/permalinks\/\">permalinks and URL patterns here<\/a>. <\/p>\n<h4>Archive Links with Location Manager<\/h4>\n<p>When the Location Manager is installed, there are additional options for controlling taxonomy links. You can find these options on the Locations tab. <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/location-manager\/\">Read more about the Locations Manager settings here<\/a>.<\/p>\n<h3>Personalize<\/h3>\n<h4>GeoDirectory Design Elements<\/h4>\n<p>The following GD Elements are commonly used on the Archive template. <\/p>\n<p>GD Loop Actions &#8211; Sorting Options and Layouts selector.<br \/>\nGD Loop &#8211; Shows the main query for the Archive page, resulting in listings on the page.<br \/>\nGD Loop Paging &#8211; Paging options to page through the listings shown on the page.<br \/>\nGD Map &#8211; Use an Archive map type to show the listings on the page. Choose &#8220;all_posts=1&#8221; to show all the posts.<br \/>\nGD Notifications &#8211; show notifications created by GD.<\/p>\n<h4>Default Content<\/h4>\n<p>When GeoDirectory is installed, the template is installed with default content. If you make changes to the page, and want to restore the default content, you can find it in the GeoDirectory Settings:<\/p>\n<p><strong>GeoDirectory &#8211; Settings &#8211; General &#8211; Pages &#8211; Click &#8220;Default Content&#8221;<\/strong><\/p>\n<p>The default content will be shown in a lightbox modal. You can copy and paste the default content back into the Page, overwriting anything you already have in the page.<\/p>\n<h4>Sorting<\/h4>\n<p>Each CPT can have one or more &#8220;Sorts&#8221;. If they are active they will be shown in the dropdown created by GD Loop Actions. <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/places\/sorting\/\">Read more about CPT Archive sorting options here<\/a>.<\/p>\n<h4>GD Recently Viewed<\/h4>\n<p>Show listings that the visitor has recently viewed with the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/geodirectory\/design-elements\/#gd_recently_viewed\" rel=\"noopener\" target=\"_blank\">GD Recently Viewed element<\/a>.<\/p>\n<h4>GD Recent Reviews<\/h4>\n<p>Show recent reviews with the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/geodirectory\/design-elements\/#gd_recent_reviews\" rel=\"noopener\" target=\"_blank\">GD Recent Reviews element<\/a>.<\/p>\n<h4><a href=\"#max-posts\" id=\"max-posts\">Max Posts to Display<\/a><\/h4>\n<p>Show more posts on the CPT Archive and Search Archive by adjusting the WordPress settings.<\/p>\n<p>WordPress Backend &#8211; Settings &#8211; Reading &#8211; Blog pages show at most -> (Set this number to your requirements)<\/p>\n<p>If that setting doesn&#8217;t have an impact, you may be using one of the rare themes that has an override for this setting. Divi, for one, has a general setting for max posts, so use that setting instead to change the posts per page.<\/p>\n<h3>Builders<\/h3>\n<p>You can absolutely use an advanced theme builder on the Archive page template. See more information <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/integrations\/builders\/\">here on the builders doc<\/a>.<\/p>\n<h3>Pages Templates and Sidebars<\/h3>\n<p>GD Uses the sidebars that come with your theme. Read more about how to <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/themes\/\" rel=\"noopener\" target=\"_blank\">choose a theme that has the sidebars you want here<\/a>.<\/p>\n<h3><a name=\"customize\" href=\"#customize\">Customize<\/a><\/h3>\n<blockquote class=\"gd-faq\">\n<h5><a href=\"#php\" name=\"php\">Customize with PHP Templates<\/a><\/h5>\n<p>You can create the Archive listing template with PHP. <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/faq\/customizing\/\">See our page here to get started<\/a>.\n<\/p><\/blockquote>\n","protected":false},"featured_media":0,"parent":683,"menu_order":2,"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\/713"}],"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=713"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/713\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/683"}],"next":[{"title":"Search Archive Template","link":"https:\/\/wpgeodirectory.com\/docs-v2\/templates\/search\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/714"}],"prev":[{"title":"Archive Item Template","link":"https:\/\/wpgeodirectory.com\/docs-v2\/templates\/archive-item\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/712"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/doc_tag?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}