I am using SNIP in conjunction with Events Calendar Pro and am having trouble with setting up the events snippet.
I am getting an error stating the start date doesnt have the timezone listed. is there a way to add multiple post meta to a property. I am currently using the
_EventStartDate for the start date but from the documentation can see that it also has _EventTimezone as an option.
How do i add these together so google can read the rich snippet.
Feel free to test my link to see what I am saying.
6 thoughts on “Multiple post meta inputs to a single property”
and thanks for your post. I hope you’re doing well today.
Unfortunately there is currently no visual option to add multiple post meta values into one property. However if you’re familiar with PHP you can set-up your own custom field type where you can do whatever you want.
Hope that helps.
Thank you for your reply.
I am not familar with PHP. is this something you would be able to help with.
I have followed the code and tried to make changes as per what I require but when activating the plugin get a fatal error on line 73.
Cool! You’re almost there! 😉
Change the following line:
$values['http://schema.org/DateTime'] = [
$values['http://schema.org/Date'] = [
Also, what’s missing is the function that is actually fetching the post meta. You can replace the last function like this:
The only thing that I’m not quite sure of is if it’s enough to just string together the two values as the startDate property must be in ISO_8601 format. Just try it and go back it it works or not! 😉
Thanks for your work, it did call the start date but it want in the iso 8601 format.
I have reached out to the events calendar support also to see if I can change the format of the _EventStartDate output to ‘c” which will give me the right format.
I am now working on trying to get the organization and venue name and address fields in. As you have stated they don’t seem to be listed in the same database table. (I am really not sure how this all works properly)
I have found this code which I tried to use in the return area of your code
My theory is that it would allow me to change the tribe get to the fields i needed? But this doesn’t work.
Is developing this plugin something I could have you assist me with? I am happy to pay for your time working on it? It would just save alot of time having this automated rather than having to override each input on all new (and past events).
I guess I can help at least with the date issue. I’ve installed the Events Calendar plugin (free version) to take a look how they store the dates. This is what I came up with:
Note that the strings are different now. At least the free version uses ‘_EventStartDate’ instead of ‘_EventStartTime’. I hope this is the same with the PRO version (that I guess you’re using).
For all the other fields, get in touch with me via email at support [at] wp-buddy [dot] com. I’m sure we can find a solution.
That seemed to work in getting the format correct, however it returned the time in Zulu time
At least now, my snips are not showing an error when tested. Just got to workout how to get it to display right.
Thanks for all your help so far. Will email you about the other parts in the next day or so.