Let Users Add Single Event to Google Calendar (and other calendars)

WordPress Event Management, Calendars & Registration Forums General Question Let Users Add Single Event to Google Calendar (and other calendars)

This topic contains 15 replies, has 3 voices, and was last updated by  Don Kiely 4 years, 4 months ago.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #37559

    I’m at a bit of a loss, but I suspect that it is because I don’t know the right terms to search for.

    We would like to be able to let our students add an event (which could be one-time events or recurring events) to their Google calendar (and ultimately other calendars). I see how people can subscribe to our entire calendar, but that is not what we want. Just one class or event at a time.

    Ideally it would be a link that we would include both on the event description page and in the confirmation email we send when they register (we use WooCommerce for registrations).

    The iCal Sync extension doesn’t seem to do it, nor does the Subscribe Link shortcode. Those seem to apply to our entire calendar.

    How can I accomplish this?

    Thanks!

    Don Kiely
    #38359

    Same here, it would be really handy to give visitors the option to add individual events to their iCal or Google calendar.

    René Vlak
    #38367

    There’s no built in short code to output this, but the url [event-url]/feed/eo-events should allow you to subscribe to that one event. (That will include all dates if its a recurring event).

    Stephen Harris
    #38380

    Thanks, Stephen! That looks promising. But I added /feed/eo-events to the end of the URL for one of our events, and it displayed some XML saying that comments are closed.

    To be painfully clear, do I correctly understand that the URL should look like this?

    https://[our-domain]/events/event/[event-name]/feed/eo-events
    
    Don Kiely
    #38388

    Hi Stephen, unfortunately, for non-programmers it is still quite complex to automate this. It would really be useful if you could add this as a feature request to the development roadmap, particularly given that many competitor products already have the option to display an ‘Add to calendar’ button for individual events.

    For a different website, I managed to create a workaround, but this was quite some work and involved Elementor as well as the Post Link Shortcodes plugin. For the website I am currently working on, this is a no-go unfortunately.

    @Don, this is how I resolved it:

    • Created an Elementor template for single-event.php
    • Added a PHP snippet to get the current post ID
    • Created a shortcode with the ‘Post Link Shortcodes’ plugin, with the following format: [post_url {{return_post_id}}].
    • Added an Elementor block with a button
    • Set the link to contain the newly created shortcode
    • Used the ‘Advanced’ settings of the block to add the string ‘feed/eo-events’ to the output URL

    Obviously, you may be able to do this with other page builders as well, or – better – programme your own solution 🙂

    René Vlak
    #38390

    Thanks, René!

    There are certainly ways to append the string to the URL (and I’m going to check out the Post Link Shortcodes plugin…sounds useful).

    Once I get confirmation about what the format of the URL should be, I’ll figure out a way to do this.

    Thanks for the tip!

    Don Kiely
    #38391

    Good to hear, good luck and let us know how you resolved this!

    René Vlak
    #38400

    Hi Don,

    That should be the right url. Can you confirm that www.[yoursite.com]/events/event/feed/eo-events returns an iCal feed? (It should be the for all events). If it doesn’t, could it be you have a plug-in that disables feeds? Not sure why you would get the message,

    What’s the url to the site?

    René, I’ll look into adding support for this. for the next update

    Stephen Harris
    #38404

    Hi Stephen,

    Thanks, but that’s not the URL template I posted. It was:

    https://[our-domain]/events/event/[event-name]/feed/eo-events
    

    Note the [event-name] portion, which your URL template didn’t include.

    My original question was about how to provide an iCal link to a single event (which could have one or more recurring sessions), not our entire calendar feed. The entire calendar feed is useless to us, since no one is interested our entire class schedule cluttering their calendar. (Although admittedly our schedule during the pandemic and our traditionally slow summer season is very thin.)

    Your 24 July response suggests that by appending /feed/eo-events to the event URL it would provide an iCal link to the event. Did I misunderstand?

    Here’s an example link that gives the error:

    https://folk.school/events/event/fish-cutting-with-a-tlaabaas/feed/eo-events

    What am I not understanding?

    Thanks so much for your help!
    Don

    Don Kiely
    #38444

    Hi Don,

    I’ve looked into this and I haven’t been able to replicate the issue, and from looking at the WordPress code I can’t see why you would be able to see that error.

    I suspect therefore, there must be another plug-in that’s blocking feeds. I noticed that your RSS feeds for posts also gave the same error.

    Do you know of any plug-in that you have activated that might be doing this? Or a plug-in that is disabling comments?

    Stephen Harris
    #38445

    Thanks, Stephen!

    I’m confused about your saying that our posts is giving an error. I’m able to read it in feedly just fine, and according to the W3C validator it is valid:

    https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Ffolk.school%2Fabout-us%2Fblog%2F

    How are you seeing an error?

    About comments: Yes, we use the Disable Comments plugin. I deactivated it, and now the link works great. Pardon my ignorance, but why would that make a difference?

    Thanks!

    Don Kiely
    #38474

    Hi Don,

    To be honest I’m not sure why the Disable Comments plug-in is breaking the iCal feed, it could be a bug with their plug-in, but I can’t be certain of that.

    What I meant about the posts was that this url was doing the same thing: https://folk.school/2020-summer-program-assistant-job-posting/feed/rss

    Your site-wide rss feed was working fine (as was the site-wide ical feed).

    Stephen Harris
    #38475

    Hi Don,

    After looking into the plug-in I can see it’s not a bug in Disable Comments plug-in. WordPress is erroneously flagging the feed as a ‘comments’ feed. I’ll look into whether this is something Event Organiser can prevent (I believe its because feeds for single items – such as posts, or in this case an event, are by default considered to comment feeds – which they are for posts).

    In the mean time, you can restrict the Disable Comments plug-in in its settings to post types other than events.

    Stephen Harris
    #38480

    Stephen,

    Interesting! Thanks for figuring that out. I hope you can figure out a way for EO to prevent that.

    I just reactivated Disable Comments, but Events are not listed in the post types list on the Settings page (just posts, pages, media, and projects from Divi). A topic in the support page indicates that only post types that declare they support comments are listed. I’m guessing EO events do, right? If so, it’s strange they aren’t listed.

    Thanks again!

    Don Kiely
    #38483

    This should be fixed in Event Organiser 3.10.1

    Stephen Harris
Viewing 15 posts - 1 through 15 (of 16 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.