{"id":1949066,"date":"2021-01-29T13:21:23","date_gmt":"2021-01-29T18:21:23","guid":{"rendered":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1949066"},"modified":"2025-05-20T07:49:25","modified_gmt":"2025-05-20T11:49:25","slug":"advanced-template-settings","status":"publish","type":"post","link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/advanced-template-settings\/","title":{"rendered":"Advanced Template Settings"},"content":{"rendered":"\n<p>The Events Calendar allows you to inject content above and below the calendar. This is handy if you want to display an image above it, or perhaps some additional information below.<\/p>\n\n\n\n<p>You&#8217;ll find these options under <strong>Events &gt; Settings &gt; Display &gt; Additional Content<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1894\" height=\"2142\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content.png\" alt=\"Additional Content settings\" class=\"wp-image-1963444\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content.png 1894w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content-265x300.png 265w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content-905x1024.png 905w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content-768x869.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content-1358x1536.png 1358w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/01\/Additional-Content-1811x2048.png 1811w\" sizes=\"auto, (max-width: 1894px) 100vw, 1894px\" \/><\/a><\/figure>\n\n\n\n<p>Note that it&#8217;s possible to do this using calendar shortcodes instead of these settings. The <a href=\"https:\/\/dev.theeventscalendar.com\/knowledgebase\/k\/embedding-calendar-views-with-the-tribe_events-shortcode\/\">calendar embed shortcode<\/a> can be used on any WordPress page or post, allowing you to drop the calendar in the editor and write content above and below the shortcode as you would with any other page or post.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Enable the Before HTML (below) on shortcodes:<\/strong> This setting allows you to disable injecting content above the calendar when the calendar is embedded on a page or post with a shortcode.<\/p>\n\n\n\n<p><strong>Add HTML before event content:<\/strong> Anything entered in this field will be displayed above the calendar. HTML is supported.<\/p>\n\n\n\n<p><strong>Enable the After HTML (below) on shortcodes:<\/strong> This setting allows you to disable injecting content below the calendar when the calendar is embedded on a page or post with a shortcode.<\/p>\n\n\n\n<p><strong>Add HTML after event content:<\/strong> Anything entered in this field will be displayed below the calendar. HTML is supported.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-hiding-additional-content-on-single-event-pages\">Hiding Additional Content on Single Event Pages<\/h2>\n\n\n\n<p>By default, <strong>Additional Content<\/strong> will appear on all event-related pages, including the main events page, event archives, and single event pages.<\/p>\n\n\n\n<p>However, in some cases, you may want this content to appear <strong>only on archive or listing pages<\/strong>, and <strong>not on individual (single) event pages<\/strong>.<\/p>\n\n\n\n<p>To exclude the content from single event pages, you can use the following conditional snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\/\/HTML before event content\nadd_filter( \n\t&#039;tribe_events_before_html&#039;, \n\tfunction( $before ) {\n\n\t\tif ( is_singular( Tribe__Events__Main::POSTTYPE ) ) {\n\t\t\treturn &#039;&#039;;\n\t\t}\n\n\t\treturn $before;\n\t} \n);\n\n\/\/HTML after event content\nadd_filter( \n\t&#039;tribe_events_after_html&#039;, \n\tfunction( $after ) {\n\n\t\tif ( is_singular( Tribe__Events__Main::POSTTYPE ) ) {\n\t\t\treturn &#039;&#039;;\n\t\t}\n\n\t\treturn $after;\n\t} \n);\n<\/pre><\/div>\n\n\n<p>See&nbsp;<a href=\"https:\/\/dev.theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">this article<\/a>&nbsp;for using custom code snippets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-notes\">Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Originally written in April 2025<\/li>\n\n\n\n<li>Tested with The Events Calendar v6.11.2<\/li>\n\n\n\n<li>Author: Darian<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The Events Calendar allows you to inject content above and below the calendar. This is handy if you want to display an image above it, or perhaps some additional information below. You&#8217;ll find these options under Events &gt; Settings &gt; Display &gt; Additional Content. Note that it&#8217;s possible to do this using calendar shortcodes instead&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","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,41,79],"tags":[25,212],"stellar-product-taxonomy":[158,161],"class_list":["post-1949066","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-getting-started","category-snippets","tag-customizations","tag-snippets","stellar-product-taxonomy-events-calendar-pro","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":41,"label":"Getting Started"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":212,"label":"snippets"}],"stellar-product-taxonomy":[{"value":158,"label":"Events Calendar Pro"},{"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":"Jaime Marchwinski","author_link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"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":41,"name":"Getting Started","slug":"getting-started","term_group":0,"term_taxonomy_id":41,"taxonomy":"category","description":"","parent":0,"count":67,"filter":"raw","term_order":"0","cat_ID":41,"category_count":67,"category_description":"","cat_name":"Getting Started","category_nicename":"getting-started","category_parent":0},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"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":212,"name":"snippets","slug":"snippets","term_group":0,"term_taxonomy_id":212,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1949066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1949066"}],"version-history":[{"count":6,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1949066\/revisions"}],"predecessor-version":[{"id":1965385,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1949066\/revisions\/1965385"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1949066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1949066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1949066"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1949066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}