{"id":2535,"date":"2026-10-20T08:34:14","date_gmt":"2026-10-20T07:34:14","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-custom-field-default-value-works\/"},"modified":"2026-10-20T08:41:01","modified_gmt":"2026-10-20T07:41:01","slug":"how-custom-field-default-value-works","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-features\/how-custom-field-default-value-works\/","title":{"rendered":"How the default value of a GeoDirectory custom field works"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The default value fills in the field when a new listing is created. It is saved with that listing like any other value. It is not a fallback that shows on listings where the field is empty.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What that means in practice<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>New listings, added from the frontend or in wp-admin, start with the default already in the field. If nobody changes it, that value is saved.<\/li>\n\n\n\n<li>Existing listings are not changed when you add or edit a default. Editing and saving an old listing does not fill in the default either.<\/li>\n\n\n\n<li>For a checkbox field, the default is whether the box starts ticked or unticked.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Set it at Places &gt; Settings &gt; Custom Fields by opening the field and filling in <em>Default value<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Filling in a value on existing listings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To set the same value on listings you already have, export the listings to CSV, fill in the column, and import the file again. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/how-to-import-export-data\/\">How to Import\/Export Data?<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Showing the same content on every listing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you want the same text or shortcode on every listing, put it in the display layer instead of in a field value. Add a Shortcode tab at Places &gt; Settings &gt; Tabs, or add the content to your details page template. It then shows on old and new listings, and you change it in one place.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Shortcodes in field values only run in textarea and HTML fields. Fields that listing owners can edit should not hold shortcodes or scripts. <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/tips-tricks-more\/how-to-allow-scripts-in-gd-custom-field-values\/\">How to allow scripts in GD Custom Field Values<\/a> covers the cases where you need it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default value fills in the field when a new listing is created. It is saved with that listing like any other value. It is not a fallback that shows on listings where the field is empty. What that means in practice Set it at Places &gt; Settings &gt; Custom Fields by opening the field [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[421,213],"class_list":["post-2535","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-core-features","gd_placecategory-extensions-features"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2535","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=2535"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2535\/revisions"}],"predecessor-version":[{"id":2713,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2535\/revisions\/2713"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2535"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2535"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}