{"id":1962795,"date":"2024-09-12T10:45:11","date_gmt":"2024-09-12T14:45:11","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1962795"},"modified":"2025-02-04T09:51:12","modified_gmt":"2025-02-04T14:51:12","slug":"how-to-disable-the-events-archive-page","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/how-to-disable-the-events-archive-page\/","title":{"rendered":"How To Disable Events (Archive) Page"},"content":{"rendered":"\n<p>As you may already know, the <strong>Events URL slug<\/strong> in <strong>Events \u2192 Settings \u2192 General (tab) \u2192 Viewing (section)<\/strong> allows you to set the front end calendar (archive of events) permalink on your site. This is a default, dynamically generated page of The Events Calendar.<\/p>\n\n\n\n<p>If you come to a situation where you do not need this page made available on the front end, the following code snippet, which you can append to your theme&#8217;s functions.php file may help.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/masoodahmed\/7b46d4010ee15604dacb315674a65965.js\"><\/script>\n\n\n\n<p>The snippet above will direct users to a page not found (404) page.<\/p>\n\n\n\n<p>Now, the single event page has an <strong>All Events<\/strong> link, which is designed to redirect users to the default events archive page, so to get around this, the following code snippet may help.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter ( &#039;tribe_get_events_link&#039; , function ( $link ) {\n\treturn $link = &#039;https:\/\/your-site.com\/your-calendar-permalink&#039;;\n} );\n<\/pre><\/div>\n\n\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you may already know, the Events URL slug in Events \u2192 Settings \u2192 General (tab) \u2192 Viewing (section) allows you to set the front end calendar (archive of events) permalink on your site. This is a default, dynamically generated page of The Events Calendar. If you come to a situation where you do not&#8230;<\/p>\n","protected":false},"author":63,"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":[116],"tags":[23,25],"stellar-product-taxonomy":[],"class_list":["post-1962795","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css-styling","tag-css","tag-customizations"],"acf":[],"taxonomy_info":{"category":[{"value":116,"label":"CSS &amp; Styling"}],"post_tag":[{"value":23,"label":"CSS"},{"value":25,"label":"Customizations"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Tristan","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/tristan\/"},"comment_info":0,"category_info":[{"term_id":116,"name":"CSS &amp; Styling","slug":"css-styling","term_group":0,"term_taxonomy_id":116,"taxonomy":"category","description":"","parent":24,"count":33,"filter":"raw","term_order":"0","cat_ID":116,"category_count":33,"category_description":"","cat_name":"CSS &amp; Styling","category_nicename":"css-styling","category_parent":24}],"tag_info":[{"term_id":23,"name":"CSS","slug":"css","term_group":0,"term_taxonomy_id":23,"taxonomy":"post_tag","description":"","parent":20,"count":48,"filter":"raw","term_order":"0"},{"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"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1962795","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\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1962795"}],"version-history":[{"count":3,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1962795\/revisions"}],"predecessor-version":[{"id":1964128,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1962795\/revisions\/1964128"}],"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=1962795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1962795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1962795"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1962795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}