{"id":2295,"date":"2026-10-20T08:30:40","date_gmt":"2026-10-20T07:30:40","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/remove-country-from-urls\/"},"modified":"2026-10-20T08:39:39","modified_gmt":"2026-10-20T07:39:39","slug":"remove-country-from-urls","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/location-manager\/remove-country-from-urls\/","title":{"rendered":"How to remove the country from GeoDirectory URLs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If all your listings are in one country, you can leave the country out of your listing, post type and location URLs. This needs the Location Manager add-on and a default country.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to GeoDirectory &gt; Settings &gt; Locations.<\/li>\n\n\n\n<li>Set Country to Enable default country. The option to hide the country only appears with this choice, because GeoDirectory has to know which country the missing part stands for.<\/li>\n\n\n\n<li>Turn on the option to hide the country part of the URL for listing, CPT and location pages.<\/li>\n\n\n\n<li>Save, then go to Settings &gt; Permalinks in WordPress and click Save Changes to refresh the rewrite rules.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Regions work the same way. Set Region to Enable default region and you can hide the region part of the URL too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Listing permalinks are a separate setting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The URL of each listing&#8217;s details page is set in Settings &gt; Permalinks under GeoDirectory permalinks, using tags such as <code>%country%<\/code>, <code>%region%<\/code>, <code>%city%<\/code>, <code>%category%<\/code> and <code>%postname%<\/code>. Taking <code>%country%<\/code> out there changes only the details pages. Region and city pages still include the country unless you also use the Locations setting above, so a location URL typed without it gives a 404 error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep enough location and category tags in the listing permalink for every URL to be unique. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/first-steps\/permalink-settings\/\">Permalink Settings<\/a> and, if you see errors after a change, <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/troubleshooting\/why-do-i-get-a-404-page-not-found-error\/\">Why do I get a 404 Page Not Found error?<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If all your listings are in one country, you can leave the country out of your listing, post type and location URLs. This needs the Location Manager add-on and a default country. Regions work the same way. Set Region to Enable default region and you can hide the region part of the URL too. Listing [&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-2295","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\/2295","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=2295"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2295\/revisions"}],"predecessor-version":[{"id":2319,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2295\/revisions\/2319"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2295"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2295"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}