{"id":865,"date":"2019-07-10T13:00:44","date_gmt":"2019-07-10T13:00:44","guid":{"rendered":"https:\/\/wpgeodirectory.com\/docs-v2\/?post_type=docs&#038;p=865"},"modified":"2020-04-06T00:27:39","modified_gmt":"2020-04-06T00:27:39","slug":"gd-post-meta","status":"publish","type":"docs","link":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/gd-post-meta\/","title":{"rendered":"GD > Post Meta"},"content":{"rendered":"<p>GD Post Meta is a powerful element for displaying the values of your Custom Fields.<\/p>\n<h3><a href=\"#intro\" name=\"intro\">Show Custom Fields in the Details Page Sidebar with GD Post Meta<\/a><\/h4>\n<p>Take control of the display of your GeoDirectory Custom Fields with the GD > Post Meta element.<\/p>\n<p>Use GD > Post Meta as a widget, shortcode, or block, they all have the same options.<\/p>\n<h3>Settings<\/h3>\n<p> icons and labels by using GD Post Meta as a widget to display a custom field.<\/p>\n<p>As an example, here is how the post_title looks. On the top is the GD Post Meta output, and the bottom is the same field shown by GD Output Location.<\/p>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/gd_post_meta-title-output.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/gd_post_meta-title-output.jpg\" alt=\"\" width=\"301\" height=\"78\" class=\"alignnone size-full wp-image-868\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/gd_post_meta-title-output.jpg 301w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/gd_post_meta-title-output-300x78.jpg 300w\" sizes=\"(max-width: 301px) 100vw, 301px\" \/><\/a><\/p>\n<p>GD Output Location, your custom field will always show icon+label+value.<br \/>\nGD Post Meta allows you to choose how your field is displayed.<\/p>\n<h4>Shortcode Builder<\/h4>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/post-meta-show.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/post-meta-show.jpg\" alt=\"\" width=\"273\" height=\"254\" class=\"alignnone size-full wp-image-867\" \/><\/a><\/p>\n<h4Guide<\/h4>\n<ol>\n<li>Choose the field you want to display &#8211; Open the field settings in the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/places\/custom\/\">Custom Fields<\/a> tab<\/li>\n<li>Open the advanced settings and find &#8220;Show in extra output locations&#8221; &#8211; Remove &#8220;Details page sidebar&#8221;<\/li>\n<li>With the advanced options still open find the &#8220;key&#8221; for your field and make a note of the value<\/li>\n<li>Open WP Backend &#8211; Appearance &#8211; Widgets &#8211; Find GD Post Meta widget and add it to the sidebar that shows on your listing details template.<\/li>\n<li>In the GD Post Meta widget options &#8211; choose the field you want to display by selecting the &#8220;key&#8221; value from the dropdown.<\/li>\n<li>Adjust other options to meet your needs, save, and then drag the widget up or down to adjust the display order.<\/li>\n<li>That&#8217;s it! Visit your details page to see the changes.<\/li>\n<\/ol>\n<h4>Widgets<\/h4>\n<p>Find the GD > Post Meta Widget in:<\/p>\n<p><em><strong>WP Backend -> Appearance -> Widgets -> GD Post Meta<\/strong><\/em><\/p>\n<p>Widgets for GD Post Meta and GD Output Location. With GD Post Meta you can drag and drop to re-order the field display in the sidebar. Add a new GD Post Meta for each field that you want to display.<\/p>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/widgets_gd_post_meta.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/widgets_gd_post_meta.jpg\" alt=\"\" width=\"442\" height=\"111\" class=\"alignnone size-full wp-image-869\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/widgets_gd_post_meta.jpg 442w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/widgets_gd_post_meta-300x75.jpg 300w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/a><\/p>\n<h3>Usage<\/h3>\n<p>In this section we cover some of the ways you can use GD > Post Meta to display different field types.<\/p>\n<h4>Post Dates<\/h4>\n<p>Use GD Post Meta to display information about the listing dates like <\/p>\n<p>Show the GD CPT Post Created Date and Post Modified Date.<\/p>\n<pre><code>[gd_post_meta key=\"post_modified\"]<\/code><\/pre>\n<pre><code>[gd_post_meta key=\"post_date\"]<\/code><\/pre>\n<h3><a href=\"#nowrap\" id=\"nowrap\">Using nowrap<\/a><\/h3>\n<p>GeoDirectory&#8217;s GD Post Meta has an option to output the value stored in the database, and then optionally to output the value without any HTML or CSS mark-up. This is commonly known as &#8216;no-wrap&#8217; or &#8216;nowrap&#8217; because the output is not &#8216;wrapped&#8217; in any other elements.<\/p>\n<p>Here is an example for the output of the post title without headings or links.<\/p>\n<pre><code class='php'>\r\n[gd_post_meta key=\"post_title\" show=\"value-raw\" no_wrap='1&#8242;]\r\n<\/code><\/pre>\n<p><a href=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/nowrap.jpg\"><img src=\"http:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/nowrap.jpg\" alt=\"\" width=\"773\" height=\"381\" class=\"alignnone size-full wp-image-1016\" srcset=\"https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/nowrap.jpg 773w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/nowrap-300x148.jpg 300w, https:\/\/wpgeodirectory.com\/docs-v2\/wp-content\/uploads\/sites\/23\/2019\/07\/nowrap-768x379.jpg 768w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/a><\/p>\n<p>With the raw value from the database you can then build other items like a novel address template, links, it is really up to you.<\/p>\n","protected":false},"featured_media":0,"parent":806,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/865"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/comments?post=865"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/865\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/806"}],"next":[{"title":"GD > Post Images","link":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/images\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/388"}],"prev":[{"title":"GD > Ninja Forms","link":"https:\/\/wpgeodirectory.com\/docs-v2\/design\/gd-ninja-forms\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/910"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/media?parent=865"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/doc_tag?post=865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}