{"id":755,"date":"2025-03-24T14:27:36","date_gmt":"2025-03-24T14:27:36","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/gd-post-meta\/"},"modified":"2025-04-03T15:23:56","modified_gmt":"2025-04-03T14:23:56","slug":"gd-post-meta","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-post-meta\/","title":{"rendered":"GD > Post Meta"},"content":{"rendered":"\n<div class=\"wp-block-blockstrap-blockstrap-widget-alert d-flex align-items-center fade show alert alert-success mb-3\" role=\"alert\"><span class=\"fas fa-check-circle me-2\"><\/span><span class=\"flex-grow-1\">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>.<\/span><\/div>\n\n\n\n<p>The <strong>GD &gt;&nbsp;<\/strong><strong>Post Meta<em>&nbsp;<\/em><\/strong>widget can output any information about a listing in a nice formatted way.<\/p>\n\n\n\n<div class=\"wp-block-blockstrap-blockstrap-widget-alert d-flex align-items-center fade show alert alert-warning mb-3\" role=\"alert\"><span class=\"fas fa-exclamation-triangle me-2\"><\/span><span class=\"flex-grow-1\">All raw post meta values can be accessed via the standard WP function\u00a0get_post_meta() by simply prefixing the field key with &#8220;geodir_&#8221; <em>E.g: to get the email use: geodir_get_post_meta( $post_id, &#8220;email&#8221;, true );<\/em><\/span><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Widget Options<\/h2>\n\n\n\n<div class=\"wp-block-blockstrap-blockstrap-widget-alert d-flex align-items-center fade show alert alert-info mb-3\" role=\"alert\"><span class=\"fas fa-info-circle me-2\"><\/span><span class=\"flex-grow-1\">Some settings for this widget are advanced settings, reveal them by clicking the button next to save.<\/span><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Title<\/strong> &#8211; The widget title.<\/li>\n\n\n\n<li><strong>Post ID<\/strong>\u00a0&#8211; Enter a specific post ID or leave blank to use the current post ID.<\/li>\n\n\n\n<li><strong>Key<\/strong> &#8211;\u00a0Select the custom field key to use.\u00a0 Standard field values are also available here such as post_date.<\/li>\n\n\n\n<li><strong>Show<\/strong> &#8211; What to show in the output, options are;\n<ul class=\"wp-block-list\">\n<li>icon + label + value<\/li>\n\n\n\n<li>icon + value<\/li>\n\n\n\n<li>label + value<\/li>\n\n\n\n<li>label<\/li>\n\n\n\n<li>value<\/li>\n\n\n\n<li>value (strip HTML tags)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>No Wrap <\/strong>(value strip tags specific) Remove wrapping div.<\/li>\n\n\n\n<li><strong>Alignment <\/strong>&#8211;\u00a0How the item should be positioned on the page.<\/li>\n\n\n\n<li><strong>Text Align<\/strong> &#8211;\u00a0How the text should be aligned.<\/li>\n\n\n\n<li><strong>Hide item on view<\/strong>\u00a0&#8211; This option can hide the whole output when viewed in a post loop grid view on under.<\/li>\n\n\n\n<li><strong>Hide secondary info on view<\/strong>\u00a0&#8211;\u00a0You can set at what view the secondary info such as label will become hidden when this is used in the post loop archive item template.<\/li>\n\n\n\n<li><strong>Output Location<\/strong> &#8211; Some output locations output content differently, here you can set one if required.<\/li>\n\n\n\n<li><strong>Extra class<\/strong> &#8211;\u00a0Give the wrapper an extra class so you can style things as you want.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example Output<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Email example<\/h3>\n\n\n\n<p><em>All our email link outputs have basic spam protection.<\/em><\/p>\n\n\n\n<p>icon + label + value<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-yesx90f26J.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>icon + value<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-QhkI3RK8u0.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>label + value<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-QtBA8tskMs.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>label<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-MPdSNO8krc.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>value<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-KcaOlG5X50.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>value (strip HTML tags)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-WqLuuupp3w.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GD &gt;&nbsp;Post Meta&nbsp;widget can output any information about a listing in a nice formatted way. Widget Options Example Output Email example All our email link outputs have basic spam protection. icon + label + value icon + value label + value label value value (strip HTML tags)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[571,600,601],"article\/categories":[213,422],"class_list":["post-755","gd_place","type-gd_place","status-publish","hentry","gd_place_tags-core-widgets","gd_place_tags-post-meta","gd_place_tags-cpt-meta","gd_placecategory-extensions-features","gd_placecategory-core-widgets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/755","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=755"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/755\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=755"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=755"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}