{"id":2275,"date":"2026-10-20T08:29:35","date_gmt":"2026-10-20T07:29:35","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/post-id-is-missing-invalid-post-type\/"},"modified":"2026-10-20T08:52:08","modified_gmt":"2026-10-20T07:52:08","slug":"post-id-is-missing-invalid-post-type","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/troubleshooting\/post-id-is-missing-invalid-post-type\/","title":{"rendered":"Fixing the &#8220;post id is missing, invalid post type&#8221; message in GeoDirectory"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The message &#8220;post id is missing, invalid post type&#8221; comes from a GeoDirectory block such as GD &gt; Post Badge or GD &gt; Dynamic Content when it cannot find a listing to read. These blocks show details of the current listing, so they only work on a listing page, in the Archive Item template, or when you give them a listing ID.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common causes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You are viewing a GeoDirectory template page directly. The Details, Archive and Archive Item pages set at GeoDirectory &gt; Settings &gt; General &gt; Pages are templates. They are used to design the listing pages and should never be linked to or opened on their own.<\/li>\n\n\n\n<li>The block has been added to a normal page or post. Either move it into the Details template, or set the block&#8217;s ID option to the listing you want to show.<\/li>\n\n\n\n<li>The URL does not resolve to a listing, so WordPress loads the template with no listing behind it. On a multilingual site this happens when a translated listing URL is not recognised, so the translation shows a blank page with only this message.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">On a multilingual site<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If the message only appears on translated listings, check the translation setup:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Make sure the GeoDirectory post types are set to be translated in your multilingual plugin.<\/li>\n\n\n\n<li>Check that the translated listing is published and that its URL opens the listing in the right language.<\/li>\n\n\n\n<li>Go to Settings &gt; Permalinks and click Save Changes to refresh the rewrite rules.<\/li>\n\n\n\n<li>Follow the <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/wp-multilingual\/wpml-multilingual-setup-guide\/\">WPML multilingual setup guide<\/a> for the GeoDirectory specific settings.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If the listing works in the main language and fails in the translation after those checks, contact support with the listing URL in both languages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The message &#8220;post id is missing, invalid post type&#8221; comes from a GeoDirectory block such as GD &gt; Post Badge or GD &gt; Dynamic Content when it cannot find a listing to read. These blocks show details of the current listing, so they only work on a listing page, in the Archive Item template, or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,437],"class_list":["post-2275","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-troubleshooting"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2275","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=2275"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2275\/revisions"}],"predecessor-version":[{"id":2286,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2275\/revisions\/2286"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2275"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2275"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}