{"id":1383197,"date":"2017-11-14T20:10:16","date_gmt":"2017-11-15T04:10:16","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/"},"modified":"2017-11-14T20:10:16","modified_gmt":"2017-11-15T04:10:16","slug":"another-yoast-related-issue","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/","title":{"rendered":"Another YOAST related issue"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I&#8217;ve spent a good amount of time trying to solve this myself, trawling through forums and google searches, but still can&#8217;t fully solve my problem.<\/p>\n<p>Like many others who have had Yoast related issues, I&#8217;ve been trying to nail the &#8220;Archive&#8221; title when on the main events page of our site. www.stringfamily.com.au\/itinerary<\/p>\n<p>I&#8217;ve reviewed the posts about adding custom code to functions.php and have done this via &#8220;My Custom Functions&#8221; WordPress plugin. (I had dramas creating a child theme&#8230; site wasn&#8217;t displaying properly and I just don&#8217;t have the time to troubleshoot it.) It works very well to the extend that the code I&#8217;ve plugged in doesn&#8217;t break the site, and in fact does change the title. But now the title is not displayed at all, and just contains &#8221; | The String Family&#8221; instead of &#8221;<\/p>\n<p>I&#8217;ve used information from these links:<br \/>\n<a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/yoast-wordpress-seo-plugin-conflicts\/\">https:\/\/theeventscalendar.com\/knowledgebase\/yoast-wordpress-seo-plugin-conflicts\/<\/a><br \/>\n<a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/titles-in-yoast-seo\/\">https:\/\/theeventscalendar.com\/knowledgebase\/titles-in-yoast-seo\/<\/a><\/p>\n<p>The code that I&#8217;m using:<\/p>\n<pre><code>\/*\nPlugin Name: The Events Calendar Remove Events Archive from Yoast Page Title\nPlugin URI: https:\/\/gist.github.com\/geoffgraham\/041c048aca979de714273314ae039ce7\nDescription: The Events Calendar - Yoast SEO - Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,)\n*\/\nadd_action( &#039;pre_get_posts&#039;, &#039;tribe_remove_wpseo_title_rewrite&#039;, 20 );\nfunction tribe_remove_wpseo_title_rewrite() {\n    if ( class_exists( &#039;Tribe__Events__Main&#039; ) &amp;&amp; class_exists( &#039;Tribe__Events__Pro__Main&#039; ) ) {\n        if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {\n            $wpseo_front = WPSEO_Frontend::get_instance();\n            remove_filter( &#039;wp_title&#039;, array( $wpseo_front, &#039;title&#039; ), 15 );\n            remove_filter( &#039;pre_get_document_title&#039;, array( $wpseo_front, &#039;title&#039; ), 15 );\n        }\n    } elseif ( class_exists( &#039;Tribe__Events__Main&#039; ) &amp;&amp; !class_exists( &#039;Tribe__Events__Pro__Main&#039; ) ) {\n        if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {\n            $wpseo_front = WPSEO_Frontend::get_instance();\n            remove_filter( &#039;wp_title&#039;, array( $wpseo_front, &#039;title&#039; ), 15 );\n            remove_filter( &#039;pre_get_document_title&#039;, array( $wpseo_front, &#039;title&#039; ), 15 );\n        }\n    }\n};\n\/*\nadd_filter( &#039;tribe_events_title_tag&#039;, function( $default_title ) {\n\tif ( ! tribe_is_month() ) {\n\t\treturn $default_title;\n\t}\n\n\treturn &#039;MONTH VIEW CUSTOM TITLE!&#039;;\n} );\n*\/<\/code><\/pre>\n<p>The bottom section of code there, currently commented out, I found on another post in your knowledge base, but it makes no difference to what is displayed in the title.<\/p>\n<p>Any help would be appreciated.<\/p>\n<p>Regards<\/p>\n<p>Joel<\/p>\n","protected":false},"template":"","class_list":["post-1383197","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>Another YOAST related issue -<\/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\/another-yoast-related-issue\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Another YOAST related issue -\" \/>\n<meta property=\"og:description\" content=\"Hi, I&#8217;ve spent a good amount of time trying to solve this myself, trawling through forums and google searches, but still can&#8217;t fully solve my problem. Like many others who have had Yoast related issues, I&#8217;ve been trying to nail the &#8220;Archive&#8221; title when on the main events page of our site. www.stringfamily.com.au\/itinerary I&#8217;ve reviewed [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/\" \/>\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\/another-yoast-related-issue\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/\",\"name\":\"Another YOAST related issue -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-11-15T04:10:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/#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\":\"Another YOAST related issue\"}]},{\"@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":"Another YOAST related issue -","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\/another-yoast-related-issue\/","og_locale":"en_US","og_type":"article","og_title":"Another YOAST related issue -","og_description":"Hi, I&#8217;ve spent a good amount of time trying to solve this myself, trawling through forums and google searches, but still can&#8217;t fully solve my problem. Like many others who have had Yoast related issues, I&#8217;ve been trying to nail the &#8220;Archive&#8221; title when on the main events page of our site. www.stringfamily.com.au\/itinerary I&#8217;ve reviewed [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/","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\/another-yoast-related-issue\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/","name":"Another YOAST related issue -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-11-15T04:10:16+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/another-yoast-related-issue\/#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":"Another YOAST related issue"}]},{"@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\/1383197","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\/1383197\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1383197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}