{"id":84965,"date":"2013-12-30T13:38:18","date_gmt":"2013-12-30T21:38:18","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/"},"modified":"2014-01-07T14:35:31","modified_gmt":"2014-01-07T22:35:31","slug":"seo-with-custom-addition-to-functions-file","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/","title":{"rendered":"SEO with Custom Addition to Functions File"},"content":{"rendered":"<p>I have added the appropriate php listed in some of the other forums regarding SEO titles when using the yoast seo plugin with modern tribe events. I was having a couple of errors and am not sure how best to address them. Below is the code I am using &#8211; for the titles, on the default page the title still shows up as &#8220;Upcoming Events &gt;&gt;&#8221;. The default page is the map page and the map page is also showing up as &#8220;Upcoming Events&gt;&gt;&#8221;. In addition the month view page title works and the individual event pages work but the list view and the photo view are not working properly. Below is the code I am using.<\/p>\n<p>&lt;?php<\/p>\n<p>add_filter(&#8216;wpseo_title&#8217;,&#8217;my_custom_titles&#8217;);<br \/>\nfunction my_custom_titles($title) {<br \/>\n    if( tribe_is_month() &amp;&amp; !is_tax() ) { \/\/ Month View Page<br \/>\n        return &#8216;Events Calendar | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_month() &amp;&amp; is_tax() ) { \/\/ Calendar Category Pages<br \/>\n        return &#8216;Events Calendar&#8217; . &#8216; &raquo; &#8216; . single_term_title(&#8221;, false);<br \/>\n    } elseif( tribe_is_event() &amp;&amp; !tribe_is_day() &amp;&amp; !is_single() ) { \/\/ The Main Events List<br \/>\n        return &#8216;Upcoming Events | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_past() || tribe_is_upcoming() &amp;&amp; !is_tax() ) { \/\/ List View Page<br \/>\n        return &#8216;Events List | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_event() &amp;&amp; is_single() ) { \/\/ Single Events<br \/>\n        return get_the_title() . &#8216; | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_day() ) { \/\/ Single Event Days<br \/>\n        return &#8216;Events on: &#8216; . date(&#8216;F j, Y&#8217;, strtotime($wp_query-&gt;query_vars[&#8216;eventDate&#8217;]));<br \/>\n    } elseif( tribe_is_venue() ) { \/\/ Single Venues<br \/>\n        return get_the_title() . &#8216; | Reshet Ramah Events&#8217;;<br \/>\n    } elseif( tribe_is_map() &amp;&amp; !is_tax() ) { \/\/ Map View Page<br \/>\n        return &#8216;Events by Location | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_map() &amp;&amp; is_tax() ) { \/\/ Map View Category Page<br \/>\n        return &#8216;Location Event Categories | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_photo() &amp;&amp; !is_tax() ) { \/\/ Photo View Page<br \/>\n        return &#8216;Events Photo View | Reshet Ramah&#8217;;<br \/>\n    } elseif( tribe_is_photo() &amp;&amp; is_tax() ) { \/\/ Photo View Category Page<br \/>\n        return &#8216;Events Categories | Reshet Ramah&#8217;;<br \/>\n    } else {<br \/>\n        return $title;<br \/>\n    }<br \/>\n}<br \/>\n?&gt;<\/p>\n","protected":false},"template":"","class_list":["post-84965","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>SEO with Custom Addition to Functions File -<\/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\/seo-with-custom-addition-to-functions-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SEO with Custom Addition to Functions File -\" \/>\n<meta property=\"og:description\" content=\"I have added the appropriate php listed in some of the other forums regarding SEO titles when using the yoast seo plugin with modern tribe events. I was having a couple of errors and am not sure how best to address them. Below is the code I am using &#8211; for the titles, on the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-01-07T22:35:31+00:00\" \/>\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\/seo-with-custom-addition-to-functions-file\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/\",\"name\":\"SEO with Custom Addition to Functions File -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-12-30T21:38:18+00:00\",\"dateModified\":\"2014-01-07T22:35:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/#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\":\"SEO with Custom Addition to Functions File\"}]},{\"@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":"SEO with Custom Addition to Functions File -","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\/seo-with-custom-addition-to-functions-file\/","og_locale":"en_US","og_type":"article","og_title":"SEO with Custom Addition to Functions File -","og_description":"I have added the appropriate php listed in some of the other forums regarding SEO titles when using the yoast seo plugin with modern tribe events. I was having a couple of errors and am not sure how best to address them. Below is the code I am using &#8211; for the titles, on the [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/","article_modified_time":"2014-01-07T22:35:31+00:00","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\/seo-with-custom-addition-to-functions-file\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/","name":"SEO with Custom Addition to Functions File -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-12-30T21:38:18+00:00","dateModified":"2014-01-07T22:35:31+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/seo-with-custom-addition-to-functions-file\/#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":"SEO with Custom Addition to Functions File"}]},{"@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\/84965","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\/84965\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=84965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}