{"id":852,"date":"2025-03-24T14:27:51","date_gmt":"2025-03-24T14:27:51","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/gd-distance-to-post\/"},"modified":"2025-04-03T15:24:11","modified_gmt":"2025-04-03T14:24:11","slug":"gd-distance-to-post","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-distance-to-post\/","title":{"rendered":"GD > Distance to Post"},"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<p>\n\tThis widget will <strong>only show when an exact GPS position is used in the URL<\/strong>, this can be the <strong>search page<\/strong> when a near search is used or this can be a <strong>near me page<\/strong> used by the <a href=\"https:\/\/wpgeodirectory.com\/downloads\/location-manager\/\">Location Manager Extension<\/a>.<\/p>\n<section class=\"alert alert-warning\">\n\tThe&nbsp; <strong><em>Distance to Post<\/em>&nbsp;<\/strong>widget is used almost exclusively in the&nbsp;<em><strong>Archive item page<\/strong>&nbsp;<\/em>template as it needs to be used in the post loop.<\/section>\n<h2>Widget Options<\/h2>\n<p> <em>There are no options for this widget.<\/em><\/p>\n<h2>Example Output<\/h2>\n<p>The below example shows that when a <strong>Near search<\/strong> is performed that the exact <strong>distance to that position will be shown in the search results<\/strong>.<\/p>\n<p><img width=\"608\" height=\"478\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-Dbf19q4lcJ.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-Dbf19q4lcJ.png 608w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-Dbf19q4lcJ-300x236.png 300w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our Super Duper Widgets. This widget will only show when an exact GPS position is used in the URL, this can be the search page when a near search is used or this can be a near me page used by the Location Manager [&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-852","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\/852","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=852"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/852\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=852"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=852"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}