WordPress: Custom Title Tags with Tribe Events + Yoast SEO

In Wordpress Tutorials by Laura

I am using the Modern Tribe Events Calendar plugin for the event calendar on my client’s website as well as the Yoast SEO plugin.

The Yoast plugin does wonders for SEO and they really think about how all the parts of your website will be impacted by a search engine. You can disable author archives, remove date snippets, customize titles and metas by taxonomy, and no index whatever you would like. Their attention to detail is fantastic. That being said – the Tribe Events Calendar does not get along well with the Yoast SEO plugin. They seem to conflict in every sense of the word. The typical Yoast SEO overrides are not rendered on event pages and the event pages do not do such a good job at native SEO, in my opinion.

Switching SEO plugins was not an option for me as I am so happy with the product offered by Yoast. In addition, the calendar offered by Tribe Events is excellent. They offer a ton of functionality and support and I really do think it is the best event calendar out there. So, in order to get the title tags and meta descriptions to work in my favor I had to add some custom php to my functions.php file in my child theme. I have added the code below but I will also go through the nuances of it.

You will need to begin by understanding the differences between wp_title and wpseo_title. wp_title is used for the standard wordpress functionality and wpseo_title is a Yoast specific function. I began by only using wpseo_title but found that there were some conflicts on the default event calendar landing page. I decided in the end to use both of these so that I could make sure all my titles were rendering properly. I added different titles for each page type displayed on my site. If you look into the Modern Tribe API you can find the other page types and just extend your if statement. See the code below for how I changed the title tags on my event calendar. Check back soon to see how I edited the meta descriptions for my calendar pages. Enjoy!