{"id":995,"date":"2025-03-24T14:28:14","date_gmt":"2025-03-24T14:28:14","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-can-i-display-a-custom-field-database-value\/"},"modified":"2025-04-03T15:24:35","modified_gmt":"2025-04-03T14:24:35","slug":"how-can-i-display-a-custom-field-database-value","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/how-can-i-display-a-custom-field-database-value\/","title":{"rendered":"How can I display a custom field database value?"},"content":{"rendered":"\n<p>When creating your GD templates for the GD Archive item or GD Details page you may want to add your own markup like wrapping HTML.&nbsp;<\/p>\n\n\n\n<p>For example your theme may use a specific class for adding beautiful CSS rules.<\/p>\n\n\n\n<p>Using GD Post Meta you can output the value of any GD Custom Field and use your own HTML.<\/p>\n\n\n\n<p>Here is an example for the Post Title<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-6RqrsG3kQF.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Here is the shortcode:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-html\">&#091;gd_post_meta key=&quot;post_title&quot; show=&quot;value-raw&quot; no_wrap=&quot;1&quot; font_size=&quot;0&quot;&#093;<\/code><\/pre>\n\n\n\n<p>Now you can add your own markup like<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-html\">&lt;h1 class=&quot;my-custom entry-title special-markup&quot;&gt;&#091;gd_post_meta key=&quot;post_title&quot; show=&quot;value-raw&quot; no_wrap=&quot;1&quot; font_size=&quot;0&quot;&#093;&lt;\/h1&gt;<\/code><\/pre>\n\n\n\n<p><br>If you only need to add a custom class, though, there is another way available in many GD widgets, inside the advanced settings, like this:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-PgWhwOKxkh.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When creating your GD templates for the GD Archive item or GD Details page you may want to add your own markup like wrapping HTML.&nbsp; For example your theme may use a specific class for adding beautiful CSS rules. Using GD Post Meta you can output the value of any GD Custom Field and use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-995","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-how-tos"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/995","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=995"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/995\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=995"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}