Event Date variable displays incorrectly
-
I am using The Events Calendar for a couple websites and in the AIOSEO Settings container at the bottom of the Event Post in the Event Title box the variable “event date” is listed after “Event Tile” and “Separator” however the date that is displayed is the date of the Post and NOT the event itself.
I have to remove the “event date” variable for every event and then put in the date of the event manually.Please fix this!
The page I need help with: [log in to see the link]
-
Hey @donniepeters,
I believe there’s been a mix up here. We have a “Post Date” smart tag of which the name is dynamically adjusted based on the post type.
For instance, for a post it would say “Post Date”, for a page it would say “Page Date” and so.. for a post type called “Event” it would say “Event Date”. If you read the description for the smart tag inside the tag dropdown, it will say the value is based on the publish date of the post.
In most cases it’s rather clear what the smart tag does but I understand that it is a bit ambiguous in this case.
Unfortunately we currently do not officially integrate with The Events Calendar plugin so we do not have any smart tags that integrate with their plugin, but we can definitely consider this is as a feature request.
Hi @arnaudbroes – there is no mix up here. The Event Calendar is widely used and they use Google Structured data in their plugins.
One only has to think that for SEO on Events to work properly it must use the actual Event Date and not the date the event post was created. No one in the world creates an event post at the moment the event is to start. The whole idea of SEO is for it to allow search engines to find the event PRIOR to it happening.
With AIOSEO the way it is Google has been listing events for the day of the post and NOT the day of the event. That is not good SEO is it? You only have to look at the Snippet Preview in the first example to see how search engines display an event.
Last year I input about 150 events and had to change the AIOSEO settings on every post. And if I forget then search engines categorize it for the day posted and not for when it is supposed to happen. It would be nice for this year where I see about 250 events that I need to post on several websites to have AIOSEO – which is the best as far as I am concerned – work with events the way it should.
Hey @donniepeters,
I totally understand where you are coming from and I agree that it is not good for SEO to output the post date instead of the actual event date.
What I meant is that this particular smart tag is working correctly as it is meant to output the publish date of the post, as stated in its description. It’s name (“Event Date”) is just really ambiguous as it is dynamically based on the current post type (“Event”). So, in this particular case it makes you think it will output the date for the actual event when it actually is not supposed to do that.
There’s a couple of things we can look into here:
- See if we can adjust the name of this smart tag to better reflect what it does and prevent confusing cases like this.
- Consider customizing the behaviour of this smart tag for the The Event Calendar plugin and similar plugins. This is not a straight-forward decision since it would make the output of the smart tag inconsistent based on the post type it’s used in.
- See if we can officially integrate with The Events Calendar plugin to better support cases like this through e.g. a new set of smart tags that is supposed to output the actual event date.
I’ve already gone ahead and created a feature request for this in our internal feature tracker.
Let me know if the above makes sense!
Hi @arnaudbroes glad you understand what I was getting at. I appreciate you are willing to look into a resolution at some point. On another website that does events every weekend I had removed the Event Date from the Search Appearance template but this did not help search engines in listing any events for the venue last year. On the website that I used for the example above where I input the date manually it did list some in Google Event Listings.
I look forward to seeing what you can come up with.Hi @ron!
Guga here, from the Events Calendar support team.
The Events Calendar doesn’t provide an integration with AIOSEO, and as mentioned by @arnaudbroes, the “Event Date” you see in the AIOSEO smart tags is the post type publication date, and not the event meta field which stores the event start date.
Adding the Event start date would require a customization, getting the correspondent meta field from a post and insert that on the title.
As an example, I can share a small PHP snippet that shows how to create a custom function to get the event start date and register it for the Yoast SEO plugin, and maybe @arnaudbroes can show us how to register that as a new variable for the AIOSEO smart tags instead.
Here’s how to do it when using Yoast SEO:
if ( class_exists('Tribe__Events__Main') && class_exists ('WPSEO_Frontend') ) { // SINGLE EVENT - Variable // Add the event start date variable. function get_tec_event_start_date() { $event_id = get_the_ID(); $start_date = tribe_get_start_date( $event_id, false, tribe_get_date_format() ); return $start_date; } // Add the event end date variable. function get_tec_event_end_date() { $event_id = get_the_ID(); $end_date = tribe_get_end_date( $event_id, false, tribe_get_date_format() ); return $end_date; } function register_custom_yoast_variables() { wpseo_register_var_replacement( '%%event_start_date%%','get_tec_event_start_date','advanced','Get the event start date' ); wpseo_register_var_replacement( '%%event_end_date%%','get_tec_event_end_date', 'advanced', 'Get the event end date' ); } // Add action add_action('wpseo_register_extra_replacements','register_custom_yoast_variables'); }
@arnaudbroes based on that snippet below that register a new variable for the Yoast SEO plugin, can you show us how to do the same but for the AIOSEO plugin?
Hello @arnaudbroes I was wondering if you willing to offer any assistance helping with a function that @gugaalves from The Event Calendar has provided for the YOAST SEO Pugin that I had used in the past until I began switching to AIOSEO – ALL 13 websites I have built and managed for others with another one being added next week where I am adding the AISEO to another website which I just too over.
All use the AIOSEO and I highly recommend it over Yoast . Having a small function that will make the Event Start Date and Event End Date smart tags work with your great product means I do no have to explain the challenge with using your product over Yoast now that the team at The Event Calendar quickly and freely offered one for me and all other users.Do you think that something like this is possible?? We have not had a reply to @gugaalves since they offered their solution… which I cam sure can be adapted.
Hey @donniepeters, I’m happy to work on this. However, we are currently working hard on our next update (scheduled for next week) and are then out with the team for a week to do team building so it will probably be a couple more weeks before I can get to this.
I really appreciate this. The one website that I really need it for is for Pride Events during June Pride Month… sigh. I guess we will have to wait until next year to appreciate the benefit it would bring. There is another project that also uses the Event Calendar on a weekly basis for over 120 events throughout the year. So when you have a chance we will implement it quickly.
Cheers
- The topic ‘Event Date variable displays incorrectly’ is closed to new replies.