Posted: April 19, 2021 at 5:32 pm
Hello, I’m trying to create a google calendar shortcode that adds an event to the google calendar, similar to the existing iCal one, but i’m hitting a roadblock, can you help? I followed directions from here: i have a function that registers the shortcode and a parser, But I’m not sure how to pull the event title and time data/information. and i’m using this link: |
|
Hi there,
It depends on the library you are registering with as to what data will be available and where within the code it will be. Can you post a Gist or Pastebin with your code in so I can take a look? |
|
https://gist.github.com/johnpdang/302b330960e2a189851f78673ea3329c I think i’m in the EE_Datetime library, which should i be in to get access to the event title? |
|
You’re in the You can pull various related objects using our model system, if you haven’t read the docs I recommend taking a look here: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System As it helps you to follow what and how you can get various data. For your current question, as you have an EE_Datetime you can do something like:
The above is how you can echo th event title, — I’m curious why you are using a dynamic shortcode for this? The |
|
thanks so much, that worked great! do you know how i would change the date format to be compatible with google calendar? i’m currently using: which outputs: but i’d like it to be: |
|
That’s they same format used in the iCal, which it does like this:
Which is basically the same as:
|
|
worked perfectly, thanks again! |
|
You’re most welcome. |
|
The support post ‘Creating Google Calendar in confirmation email’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.