{"id":1965345,"date":"2025-07-02T04:11:04","date_gmt":"2025-07-02T08:11:04","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1965345"},"modified":"2025-07-02T04:11:05","modified_gmt":"2025-07-02T08:11:05","slug":"extending-the-events-calendar-with-acf","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/extending-the-events-calendar-with-acf\/","title":{"rendered":"Extending The Events Calendar with ACF"},"content":{"rendered":"\n<p>Extending The Events Calendar&nbsp;with Advanced Custom Fields (ACF) empowers you to tailor event pages with custom data, enhancing both functionality and user experience. Whether you&#8217;re aiming to add speaker bios, event sponsors, or unique scheduling details, integrating ACF allows for a high degree of customization.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-create-custom-fields-with-acf\">Step 1: Create Custom Fields with ACF<\/h2>\n\n\n\n<p>1. <strong>Install and Activate ACF<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate to your WordPress dashboard.<\/li>\n\n\n\n<li>Go to <strong>Plugins \u2192 Add New<\/strong>, search for <strong>Advanced Custom Fields<\/strong>, and install it.<\/li>\n\n\n\n<li>Activate the plugin.<\/li>\n<\/ul>\n\n\n\n<p>2. <strong>Create a New Field Group<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>Custom Fields \u2192 Add New<\/strong>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1892\" height=\"785\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.29.20-AM.png\" alt=\"\" class=\"wp-image-1965346\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.29.20-AM.png 1892w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.29.20-AM-300x124.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.29.20-AM-1024x425.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.29.20-AM-768x319.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.29.20-AM-1536x637.png 1536w\" sizes=\"auto, (max-width: 1892px) 100vw, 1892px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Name your field group (e.g., &#8220;Event Details&#8221;).<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Add Field<\/strong> to define each custom field. In this example, we are going to add a custom Text field called &#8216;<strong>Speaker Name<\/strong>&#8216;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1785\" height=\"816\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.30.38-AM.png\" alt=\"\" class=\"wp-image-1965347\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.30.38-AM.png 1785w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.30.38-AM-300x137.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.30.38-AM-1024x468.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.30.38-AM-768x351.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.30.38-AM-1536x702.png 1536w\" sizes=\"auto, (max-width: 1785px) 100vw, 1785px\" \/><\/figure>\n\n\n\n<p>3. <strong>Set Location Rules<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the &#8220;Location Rules&#8221; box, set the rule to <strong>Post Type<\/strong> is equal to <strong>Event<\/strong>.<\/li>\n\n\n\n<li>This ensures the custom fields appear on the event edit screen.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1572\" height=\"367\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.31.31-AM.png\" alt=\"\" class=\"wp-image-1965348\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.31.31-AM.png 1572w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.31.31-AM-300x70.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.31.31-AM-1024x239.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.31.31-AM-768x179.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-11.31.31-AM-1536x359.png 1536w\" sizes=\"auto, (max-width: 1572px) 100vw, 1572px\" \/><\/figure>\n\n\n\n<p>4. <strong>Publish the Field Group<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Publish<\/strong> to save your field group.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-adding-the-custom-field-to-event-pages\">Step 2: Adding the Custom Field to Event Pages<\/h2>\n\n\n\n<p>Now it&#8217;s time to add a Speaker for events.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the single event page.<\/li>\n\n\n\n<li>Scroll down to find the &#8216;Event Details&#8217; section.<\/li>\n\n\n\n<li>Add &#8216;Speaker Name&#8217; into the text field.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1342\" height=\"800\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.13.35-PM.png\" alt=\"\" class=\"wp-image-1965356\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.13.35-PM.png 1342w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.13.35-PM-300x179.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.13.35-PM-1024x610.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.13.35-PM-768x458.png 768w\" sizes=\"auto, (max-width: 1342px) 100vw, 1342px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1918\" height=\"632\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.25.14-PM.png\" alt=\"\" class=\"wp-image-1965358\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.25.14-PM.png 1918w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.25.14-PM-300x99.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.25.14-PM-1024x337.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.25.14-PM-768x253.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-2.25.14-PM-1536x506.png 1536w\" sizes=\"auto, (max-width: 1918px) 100vw, 1918px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-display-custom-fields-on-event-pages\">Step 3: Display Custom Fields on Event Pages<\/h2>\n\n\n\n<p>In this example, we want to add the ACF custom field below the Website URL, so we should customize the <code>details.php<\/code> file.<\/p>\n\n\n\n<p>To display an Advanced Custom Fields (ACF) field within the <code>details.php<\/code> template of The Events Calendar, it&#8217;s recommended to use a template override in your theme rather than modifying the plugin&#8217;s core files. This approach ensures that your customizations are preserved during plugin updates.<\/p>\n\n\n\n<p>1. <strong>Edit the Event Template<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Start by copying the file <code>details.php<\/code> from <code>\/wp-content\/plugins\/the-events-calendar\/src\/views\/modules\/meta<\/code><\/li>\n\n\n\n<li>Put the file inside the following path: <code>[your-theme]\/tribe-events\/modules\/meta<\/code><\/li>\n<\/ul>\n\n\n\n<p>2. <strong>Insert ACF Template Tags<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Within the template file, use ACF functions to display your custom field:<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php if( get_field(&#039;speaker_name&#039;) ): ?&gt; \n    &lt;p&gt;&lt;strong&gt;Speaker:&lt;\/strong&gt; &lt;?php the_field(&#039;speaker_name&#039;); ?&gt;&lt;\/p&gt; \n&lt;?php endif; ?&gt;\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>To add the custom field below the Website URL, you should add the code just before:<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php do_action( &#039;tribe_events_single_meta_details_section_end&#039; ); ?&gt;\n<\/pre><\/div>\n\n\n<p>3. <strong>Save and Test<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After editing, save the template file.<\/li>\n\n\n\n<li>Visit an event page to ensure the custom fields display correctly. You should see a result similar to this screenshot:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1428\" height=\"562\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-1.59.47-PM-1.png\" alt=\"\" class=\"wp-image-1965354\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-1.59.47-PM-1.png 1428w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-1.59.47-PM-1-300x118.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-1.59.47-PM-1-1024x403.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/05\/Image-2025-05-19-at-1.59.47-PM-1-768x302.png 768w\" sizes=\"auto, (max-width: 1428px) 100vw, 1428px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Extending The Events Calendar&nbsp;with Advanced Custom Fields (ACF) empowers you to tailor event pages with custom data, enhancing both functionality and user experience. Whether you&#8217;re aiming to add speaker bios, event sponsors, or unique scheduling details, integrating ACF allows for a high degree of customization. Step 1: Create Custom Fields with ACF 1. Install and&#8230;<\/p>\n","protected":false},"author":60,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[24,84],"tags":[25,58,207],"stellar-product-taxonomy":[161],"class_list":["post-1965345","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-theming-overview","tag-customizations","tag-php","tag-template-override","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":84,"label":"Templating &amp; Layout"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":58,"label":"PHP"},{"value":207,"label":"Template override"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Atousa","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/atousa\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizations","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":110,"filter":"raw","term_order":"0","cat_ID":24,"category_count":110,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0},{"term_id":84,"name":"Templating &amp; Layout","slug":"theming-overview","term_group":0,"term_taxonomy_id":84,"taxonomy":"category","description":"","parent":24,"count":59,"filter":"raw","term_order":"0","cat_ID":84,"category_count":59,"category_description":"","cat_name":"Templating &amp; Layout","category_nicename":"theming-overview","category_parent":24}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":177,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":128,"filter":"raw","term_order":"0"},{"term_id":207,"name":"Template override","slug":"template-override","term_group":0,"term_taxonomy_id":207,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1965345"}],"version-history":[{"count":8,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965345\/revisions"}],"predecessor-version":[{"id":1965830,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1965345\/revisions\/1965830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1965345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1965345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1965345"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1965345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}