{"id":1434931,"date":"2018-01-24T10:46:02","date_gmt":"2018-01-24T18:46:02","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/"},"modified":"2018-01-24T10:46:02","modified_gmt":"2018-01-24T18:46:02","slug":"changing-event-page-title-archives-to-upcoming-events-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/","title":{"rendered":"Changing event page title archives to Upcoming Events"},"content":{"rendered":"<p>There is a piece of code that seems might have just broke with the latest WP version. I had applied the below code from your codex:<\/p>\n<p><code>\/\/ Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,)<br \/>\nadd_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 );<br \/>\nfunction tribe_remove_wpseo_title_rewrite() {<br \/>\n    if ( class_exists( 'Tribe__Events__Main' ) &amp;&amp; class_exists( 'Tribe__Events__Pro__Main' ) ) {<br \/>\n        if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {<br \/>\n            $wpseo_front = WPSEO_Frontend::get_instance();<br \/>\n            remove_filter( 'wp_title', array( $wpseo_front, 'title' ), 15 );<br \/>\n            remove_filter( 'pre_get_document_title', array( $wpseo_front, 'title' ), 15 );<br \/>\n        }<br \/>\n    } elseif ( class_exists( 'Tribe__Events__Main' ) &amp;&amp; !class_exists( 'Tribe__Events__Pro__Main' ) ) {<br \/>\n        if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {<br \/>\n            $wpseo_front = WPSEO_Frontend::get_instance();<br \/>\n            remove_filter( 'wp_title', array( $wpseo_front, 'title' ), 15 );<br \/>\n            remove_filter( 'pre_get_document_title', array( $wpseo_front, 'title' ), 15 );<br \/>\n        }<br \/>\n    }<br \/>\n};<br \/>\n<\/code><\/p>\n<p>Since the WP update, I receive this error:<\/p>\n<p><code><br \/>\nUncaught Error: Call to undefined function tribe_is_month() in \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-content\/plugins\/constitutional-functions\/constitutional-functions.php:581<br \/>\nStack trace:<br \/>\n#0 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-includes\/class-wp-hook.php(286): tribe_remove_wpseo_title_rewrite(Object(WP_Query))<br \/>\n#1 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-includes\/class-wp-hook.php(310): WP_Hook-&gt;apply_filters(Object(WP_Query), Array)<br \/>\n#2 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-includes\/plugin.php(515): WP_Hook-&gt;do_action(Array)<br \/>\n#3 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-includes\/class-wp-query.php(1634): do_action_ref_array('pre_get_posts', Array)<br \/>\n#4 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-includes\/class-wp-query.php(3222): WP_Query-&gt;get_posts()<br \/>\n#5 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063ec1\/code\/wp-includes\/post.php(1704): WP_Query-&gt;query(Array)<br \/>\n#6 \/srv\/bindings\/a331c53837bf4c9c8a695623a5063<br \/>\n<\/code><\/p>\n<p>This takes error takes down my site. Any suggestions to fix this? I need to reapply the code so the page title of events is back to Upcoming Events.<\/p>\n<p>FYI, I have switched themes (I use a custom theme I developed) to TwentySeventeen and disabled other plugins with no change.<\/p>\n","protected":false},"template":"","class_list":["post-1434931","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Changing event page title archives to Upcoming Events -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Changing event page title archives to Upcoming Events -\" \/>\n<meta property=\"og:description\" content=\"There is a piece of code that seems might have just broke with the latest WP version. I had applied the below code from your codex: \/\/ Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,) add_action( &#039;pre_get_posts&#039;, &#039;tribe_remove_wpseo_title_rewrite&#039;, 20 ); function tribe_remove_wpseo_title_rewrite() { if ( class_exists( &#039;Tribe__Events__Main&#039; ) &amp;&amp; class_exists( [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/\",\"name\":\"Changing event page title archives to Upcoming Events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-01-24T18:46:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Changing event page title archives to Upcoming Events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Changing event page title archives to Upcoming Events -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/","og_locale":"en_US","og_type":"article","og_title":"Changing event page title archives to Upcoming Events -","og_description":"There is a piece of code that seems might have just broke with the latest WP version. I had applied the below code from your codex: \/\/ Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,) add_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 ); function tribe_remove_wpseo_title_rewrite() { if ( class_exists( 'Tribe__Events__Main' ) &amp;&amp; class_exists( [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/","name":"Changing event page title archives to Upcoming Events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-01-24T18:46:02+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/changing-event-page-title-archives-to-upcoming-events-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Changing event page title archives to Upcoming Events"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1434931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1434931\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1434931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}