{"id":2964,"date":"2026-10-20T09:02:34","date_gmt":"2026-10-20T08:02:34","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/geodirectory-events-faq\/"},"modified":"2026-10-20T09:02:34","modified_gmt":"2026-10-20T08:02:34","slug":"geodirectory-events-faq","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/geodirectory-events-faq\/","title":{"rendered":"GeoDirectory events FAQ"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Answers to common GeoDirectory questions about events. Click a question to open the answer.<\/p>\n\n\n\n<div class=\"wp-block-blockstrap-blockstrap-widget-accordion accordion mb-3\">\n<div class=\"accordion-item\" id=\"heading-event-schema-offers-performer\"><h2 class=\"accordion-header\"><button class=\"accordion-button\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-event-schema-offers-performer\" aria-expanded=\"true\" aria-controls=\"collapse-event-schema-offers-performer\">How do I add offers and performer to the event schema?<\/button><\/h2><div class=\"accordion-collapse collapse show\" id=\"collapse-event-schema-offers-performer\" aria-labelledby=\"heading-event-schema-offers-performer\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">GeoDirectory adds JSON-LD schema to every listing&#8217;s details page, but it only fills in the fields it knows about. Google Search Console may then warn that an event is missing <code>offers<\/code> or <code>performer<\/code>. You can add both with the <code>geodir_details_schema<\/code> filter.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to Events &gt; Settings &gt; Custom Fields and add the predefined Price field (its key is <code>price<\/code>).<\/li>\n\n\n\n<li>Add a Text field for the performer and give it the key <code>performer<\/code>.<\/li>\n\n\n\n<li>Add the snippet below with the <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/useful-plugins\/code-snippets-plugin\/\">Code Snippets plugin<\/a>, then fill the new fields on your events.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">add_filter( &#039;geodir_details_schema&#039;, &#039;my_gd_event_schema_extras&#039;, 20, 2 );\nfunction my_gd_event_schema_extras( $schema, $post ) {\n\tglobal $gd_post;\n\n\tif ( empty( $gd_post-&gt;post_type ) || &#039;gd_event&#039; !== $gd_post-&gt;post_type ) {\n\t\treturn $schema;\n\t}\n\n\t\/\/ Price field (key: price).\n\tif ( ! empty( $gd_post-&gt;price ) ) {\n\t\t$schema&#091;&lt;span&gt;&lt;\/span&gt;&#039;offers&#039;&#093; = array(\n\t\t\t&#039;@type&#039;         =&gt; &#039;Offer&#039;,\n\t\t\t&#039;price&#039;         =&gt; $gd_post-&gt;price,\n\t\t\t&#039;priceCurrency&#039; =&gt; &#039;USD&#039;, \/\/ Change to your currency code.\n\t\t\t&#039;availability&#039;  =&gt; &#039;https:\/\/schema.org\/InStock&#039;,\n\t\t\t&#039;url&#039;           =&gt; $schema&#091;&lt;span&gt;&lt;\/span&gt;&#039;url&#039;&#093;,\n\t\t);\n\t}\n\n\t\/\/ Text field with the key: performer.\n\tif ( ! empty( $gd_post-&gt;performer ) ) {\n\t\t$schema&#091;&lt;span&gt;&lt;\/span&gt;&#039;performer&#039;&#093; = array(\n\t\t\t&#039;@type&#039; =&gt; &#039;Person&#039;, \/\/ Or &#039;Organization&#039;.\n\t\t\t&#039;name&#039;  =&gt; $gd_post-&gt;performer,\n\t\t);\n\t}\n\n\treturn $schema;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Set your own currency code, and use <code>Organization<\/code> instead of <code>Person<\/code> if your performers are groups or companies. Clear any page cache before you test the listing again in Google&#8217;s Rich Results Test.<\/p>\n<\/div><\/div><\/div>\n<\/div>\n<script type=\"application\/ld+json\">{\n    \"@context\": \"https:\/\/schema.org\",\n    \"@type\": \"FAQPage\",\n    \"mainEntity\": [\n        {\n            \"@type\": \"Question\",\n            \"name\": \"How do I add offers and performer to the event schema?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"GeoDirectory adds JSON-LD schema to every listing\\u0027s details page, but it only fills in the fields it knows about. Google Search Console may then warn that an event is missing offers or performer. You can add both with the geodir_details_schema filter.\\n\\n\\n\\n\\nGo to Events \\u003E Settings \\u003E Custom Fields and add the predefined Price field (its key is price).\\n\\n\\n\\nAdd a Text field for the performer and give it the key performer.\\n\\n\\n\\nAdd the snippet below with the Code Snippets plugin, then fill the new fields on your events.\\n\\n\\n\\n\\nadd_filter( \\u0027geodir_details_schema\\u0027, \\u0027my_gd_event_schema_extras\\u0027, 20, 2 );\\nfunction my_gd_event_schema_extras( $schema, $post ) {\\n\\tglobal $gd_post;\\n\\n\\tif ( empty( $gd_post-\\u003Epost_type ) || \\u0027gd_event\\u0027 !== $gd_post-\\u003Epost_type ) {\\n\\t\\treturn $schema;\\n\\t}\\n\\n\\t\/\/ Price field (key: price).\\n\\tif ( ! empty( $gd_post-\\u003Eprice ) ) {\\n\\t\\t$schema[\\u003Cspan\\u003E\\u003C\/span\\u003E\\u0027offers\\u0027] = array(\\n\\t\\t\\t\\u0027@type\\u0027         =\\u003E \\u0027Offer\\u0027,\\n\\t\\t\\t\\u0027price\\u0027         =\\u003E $gd_post-\\u003Eprice,\\n\\t\\t\\t\\u0027priceCurrency\\u0027 =\\u003E \\u0027USD\\u0027, \/\/ Change to your currency code.\\n\\t\\t\\t\\u0027availability\\u0027  =\\u003E \\u0027https:\/\/schema.org\/InStock\\u0027,\\n\\t\\t\\t\\u0027url\\u0027           =\\u003E $schema[\\u003Cspan\\u003E\\u003C\/span\\u003E\\u0027url\\u0027],\\n\\t\\t);\\n\\t}\\n\\n\\t\/\/ Text field with the key: performer.\\n\\tif ( ! empty( $gd_post-\\u003Eperformer ) ) {\\n\\t\\t$schema[\\u003Cspan\\u003E\\u003C\/span\\u003E\\u0027performer\\u0027] = array(\\n\\t\\t\\t\\u0027@type\\u0027 =\\u003E \\u0027Person\\u0027, \/\/ Or \\u0027Organization\\u0027.\\n\\t\\t\\t\\u0027name\\u0027  =\\u003E $gd_post-\\u003Eperformer,\\n\\t\\t);\\n\\t}\\n\\n\\treturn $schema;\\n}\\n\\n\\n\\nSet your own currency code, and use Organization instead of Person if your performers are groups or companies. Clear any page cache before you test the listing again in Google\\u0027s Rich Results Test.\"\n            }\n        }\n    ]\n}<\/script>","protected":false},"excerpt":{"rendered":"<p>Answers to common GeoDirectory questions about events. Click a question to open the answer.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2964","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\/2964","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=2964"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2964\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2964"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2964"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}