Home › Forums › Calendar Products › Events Calendar PRO › Is there a way of getting an ical feed for all events please?
- This topic has 7 replies, 4 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
February 26, 2016 at 4:41 am #1082359
Lee Branch
ParticipantHi guys,
I’ve set up The Events Calendar Pro on a client’s new website.
They’re a school and want parents to be able to add the school events calendar ical feed to their own calendars, so they always know when key term dates are.
I’ve seen an export to ical button on the various event listing views, but the wording suggests that it only creates an ical feed of the events currently shown on that page.
We need to offer parents a way of getting their calendars updated each time the school adds or changes an event, for all listed future events.
How can we do this please?
Thanks muchly 🙂
February 26, 2016 at 9:47 am #1082544Brian
MemberHi,
Thanks for using our plugins. I can help out here.
We do not have a feature to do this, but this snippet will create an ical link people can use.
It will create a 1 year feed of events, always from the current day.
Add that to your child theme’s (or parent) functions.php to use it.
https://gist.github.com/cliffordp/ab1f7c4d95723ee6f892/
Then you can link to the feed with this:
http://yoursite.com/events/?ical=1&year-feed
Let me know how that works out.
Thanks
February 26, 2016 at 4:09 pm #1082768Lee Branch
ParticipantReally appreciate the assistance, but I added this and am now getting an error message and can’t access the site…
Oopsie.
Luckily I copied the contents of functions.php first as I thought it might kill it, but I chose crossing fingers instead of backing up. I’m off to find some FTP credentials to log in and fix it, here’s the error I got:
Parse error: syntax error, unexpected ‘<‘ in /home/sandown/public_html/wp-content/themes/bb-theme-child/functions.php on line 13
Here’s the contents of the original file:
<?php
// Defines
define( ‘FL_CHILD_THEME_DIR’, get_stylesheet_directory() );
define( ‘FL_CHILD_THEME_URL’, get_stylesheet_directory_uri() );// Classes
require_once ‘classes/class-fl-child-theme.php’;// Actions
add_action( ‘fl_head’, ‘FLChildTheme::stylesheet’ );I just pasted yours at the end and got the error above.
Any chance you could repost the code with this bit added? Cheeky I know but hey!
Thanks,
LeeFebruary 26, 2016 at 4:27 pm #1082774Lee Branch
ParticipantDoh! Forgot I can just edit functions.php from CPanel’s File Manager.
I deleted just the first line of the code you gave me and re-saved:
<?php
…and the site’s working again.
I swapped the domain name for my client’s site in that URL you gave me, and added to my Google Calendar by adding the URL and it’s worked great, thank you.
Please could you let me know if this is a one-time sync – i.e. anything published at the time the ical feed is created/added to the calendar will be shown – or a continuously updated feed – i.e. if I add more events that take place in the next year will these be added to peoples’ calendars too?
Also, can I change the URL to http://yoursite.com/events/?ical=2&year-feed or http://yoursite.com/events/?ical=3&year-feed to get a longer time period? Or is the other code snippet set to 1 year only?
Thanks so much for your help,
LeeFebruary 27, 2016 at 9:53 am #1082926Brian
MemberHi,
Glad you got it working.
The whole snippet is geared to one year. It could be modified to get more, but that is beyond the support we can provide.
The link will always get all events in the next year from the current day. So all new events will be added to it as well.
Cheers
March 7, 2016 at 1:24 pm #1085983Fredrik
ParticipantHi The Events Calendar.
BTW: I’ve purchased The Events Calendar Pro license(s).I would really appreciate (read: I thought it was already there) kind of URL convention, which would automagically provide iCal feeds for different Event categories.
If possible I would like to avoid manual “hacks” to PHP functions. Would you please consider adding built-in support for iCal feeds?
Regards, Fredrik Strange
March 8, 2016 at 6:08 pm #1086486Brian
MemberHi, Fredick,
If you think that is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.
March 23, 2016 at 9:35 am #1092932Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Is there a way of getting an ical feed for all events please?’ is closed to new replies.
