Title: Title tag bug
Last modified: August 22, 2016

---

# Title tag bug

 *  Resolved [lisaleague](https://wordpress.org/support/users/lisaleague/)
 * (@lisaleague)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/title-tag-bug/)
 * Hi!
 * I’m setting up the events calendar and notice that I cannot control the title
   tag – it is not the same that I have entered for the page in WordPress SEO by
   Yoast.
 * It displays “Events – sitename”
 * Also, if I set list view as the default rather than month view, it displays the
   page URL instead of “Events – sitename”
 * I would prefer to be able to control this for SEO, thanks.
 * [https://wordpress.org/plugins/the-events-calendar/](https://wordpress.org/plugins/the-events-calendar/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Brook](https://wordpress.org/support/users/brook-tribe/)
 * (@brook-tribe)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/title-tag-bug/#post-5460423)
 * Howdy lisa,
 * That is true. Because our plugin is not just one page, but rather 100s of them
   many with unique titles you can not set them from Yoast. There has been some 
   discussion between us and Yoast to see if we could make something like that happen
   in the future, but it’s definitely not possible yet without a dash of code. Fortunately
   we have a snippet that walks folks through this: [http://pastebin.com/QU2aMwBJ](http://pastebin.com/QU2aMwBJ)
   That will allow you to change the title on any pages. And you’ll note it has 
   some Yoast specific instructions that you will likely find useful.
 * Cheers!
 * – Brook
 *  Thread Starter [lisaleague](https://wordpress.org/support/users/lisaleague/)
 * (@lisaleague)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/title-tag-bug/#post-5460424)
 * Hi Brook,
 * I pasted that into a custom plugin and it does work. But I only want to set the
   title for the main page that the calendar displays on.
 * It works on that page, but I do want to KEEP the single events titles. How do
   I do that? I’m using:
 *     ```
       // Runs the <title> element through our custom filter
       //add_filter('tribe_events_title_tag', 'filter_events_title');
       // If you are using certain versions of Yoast you might try deleting the above line and uncommenting the following one
       add_filter('wpseo_title', 'filter_events_title');
   
       // Tribe events: Manually set title for each page
       function filter_events_title ($title) {
   
       	if ( tribe_is_event() && is_single() ) { // Single Events
       		$title = 'Single event page';
       	}
       	elseif ( tribe_is_month() && !is_tax() ) {  // Month View Page
       		$title = 'Title that I want';
       	}
       	return $title;
       }
       ```
   
 * So what do I put here:
 * $title = ‘Single event page’;
 * If I want to keep the generated title?
 * Thanks!
 *  [Brook](https://wordpress.org/support/users/brook-tribe/)
 * (@brook-tribe)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/title-tag-bug/#post-5460440)
 * You are welcome! You would just delete that block entirely. Specifically you 
   would delete this:
 *     ```
       if ( tribe_is_event() && is_single() ) { // Single Events
       		$title = 'Single event page';
       	}
       	else
       ```
   
 * Thus you would just have an if left behind, no elseif. Hope that makes sense.
 * – Brook
 *  Thread Starter [lisaleague](https://wordpress.org/support/users/lisaleague/)
 * (@lisaleague)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/title-tag-bug/#post-5460441)
 * Hey Brook!
 * Thanks again, the directions above worked great.
 * Almost got it – so now only view not quite there is after I hit the main page
   the calendar is on – then when I paginate by month – what is controlling the 
   output for the title tag on that page?
 * It reads, for example: “Events for February 2015 | ” and there is nothing after
   the pipe symbol, where I’d like to have the site name.
 * So I’d like it to be “Events for Month Year | sitename”
 * Thanks!
 * Lisa
 *  [Brook](https://wordpress.org/support/users/brook-tribe/)
 * (@brook-tribe)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/title-tag-bug/#post-5460443)
 * Ahh for sure. You can add the sitename using the WP API. I forget the exact function.
   Perhaps it is wp_get_option? Check with the codex for hot to get the site name.
 * Cheers!
 * – Brook

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Title tag bug’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Brook](https://wordpress.org/support/users/brook-tribe/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/title-tag-bug/#post-5460443)
 * Status: resolved