{"id":2461,"date":"2026-10-20T08:33:27","date_gmt":"2026-10-20T07:33:27","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/geodirectory-and-yoast-seo-sitemaps\/"},"modified":"2026-10-20T08:53:39","modified_gmt":"2026-10-20T07:53:39","slug":"geodirectory-and-yoast-seo-sitemaps","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/location-manager\/geodirectory-and-yoast-seo-sitemaps\/","title":{"rendered":"GeoDirectory and Yoast SEO sitemaps"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">GeoDirectory listings, categories and tags are ordinary WordPress post types and taxonomies, so Yoast SEO puts them in its XML sitemap (<code>sitemap_index.xml<\/code>) the same way it does posts and pages. Whether each post type and taxonomy is included is controlled in Yoast&#8217;s own settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Location pages in the sitemap<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Location pages, such as a city page or a post type filtered by a city, come from the Location Manager add-on, and Location Manager adds them to the Yoast sitemap. When Yoast SEO is active, the Location Manager settings have a Sitemaps section with these options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hide Locations removes the location pages.<\/li>\n\n\n\n<li>Hide Post Types removes post type pages that are filtered by a location.<\/li>\n\n\n\n<li>Hide Categories removes category pages that are filtered by a location.<\/li>\n\n\n\n<li>Hide Tags removes tag pages that are filtered by a location. This one is on by default.<\/li>\n\n\n\n<li>Neighbourhoods adds neighbourhood pages, which are left out unless you turn it on.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The same section shows options for Rank Math, or for the WordPress core sitemap, when you use those instead. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/location-manager\/settings-overview-for-locations-settings\/\">Settings overview for Locations &gt; Settings<\/a> for the other Location Manager settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The sitemap shows an error or a blank page<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If the sitemap shows &#8220;error on line 2 at column 1: Extra content at the end of the document&#8221;, something printed text before the XML started. This is usually a PHP notice or warning shown on screen, or stray output from a plugin or theme. View the page source of the sitemap and the message at the top will often tell you which plugin it came from.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Update GeoDirectory, Location Manager and Yoast SEO to their latest versions.<\/li>\n\n\n\n<li>Stop PHP messages being printed on the page by adding the line below to <code>wp-config.php<\/code>. If you need them, they can still go to the debug log.<\/li>\n\n\n\n<li>Clear your caching plugin and any server cache, then go to Settings &gt; Permalinks and click Save Changes once.<\/li>\n\n\n\n<li>Load the sitemap again. If the error is still there, deactivate other plugins one at a time to find the one adding output.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">define( &#039;WP_DEBUG_DISPLAY&#039;, false );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>GeoDirectory listings, categories and tags are ordinary WordPress post types and taxonomies, so Yoast SEO puts them in its XML sitemap (sitemap_index.xml) the same way it does posts and pages. Whether each post type and taxonomy is included is controlled in Yoast&#8217;s own settings. Location pages in the sitemap Location pages, such as a city [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[213,425],"class_list":["post-2461","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-extensions-features","gd_placecategory-location-manager"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2461","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=2461"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2461\/revisions"}],"predecessor-version":[{"id":2539,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2461\/revisions\/2539"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2461"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2461"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}