Home › Forums › Calendar Products › Events Calendar PRO › Export entire year to ics file
- This topic has 8 replies, 4 voices, and was last updated 9 years, 6 months ago by
Adam.
-
AuthorPosts
-
September 12, 2016 at 5:16 am #1162731
Adam
ParticipantHi Support Team,
I’ve got Events Calendar PRO installed on a clients site and have a question regarding the “export month’s events” button.
Is the button limited to one month or is it possible for me to add another button, for example the current year or date range?Best regards,
Adam.
September 12, 2016 at 8:46 pm #1163193Cliff
MemberHi Adam.
Here’s an installable .zip file (install it at your Plugins screen) that adds two URLs:
- example.com/events/?ical=1&tribe_display=recently-published
- example.com/events/?ical=1&tribe_display=year
The first is useful when folks are trying to use the iCal importer to pull events from one website to another. It will contain any recently published or modified events. Note: It is subject to the postsperpage setting in WP-Admin > Events > Settings.
The second exports this year’s events (from January through December).
If preferable, there’s a code snippet to share just the events one year out from today. Let me know if this plugin works for you or if you want the code for exporting one year from today.
===
And, yes, the export button’s text and link can be customized — Or, you could even add a second button.
Please let me know what your ideal is (including any annotated screenshots or links to your site), and I’ll see how I can help you with that.
September 13, 2016 at 1:49 am #1163270Adam
ParticipantHi Cliff,
Thanks for coming back with that. I’ll have a look at this and if I have any questions get back to you with maybe some screen shots.
Many thanks,
Adam.
September 13, 2016 at 2:51 am #1163289Adam
ParticipantHi Cliff,
I’ve installed the plugin and would like to add a second button, something like in the attached screen shot that I marked up. To add the second button, do I add it in the functions.php file? If so what code to I need to add or is it defined elsewhere?
Thanks,
Adam.
September 13, 2016 at 2:12 pm #1163619Cliff
MemberAdam, please check out this code snippet:
https://gist.github.com/cliffordp/f7a9ef262017cae04e6fd9645e478c0d
Let me know how it goes!
September 14, 2016 at 8:54 am #1163942Adam
ParticipantHi Cliff,
I added the code to the functions.php file and the new “Export 2016’s events “button has appeared on the calendar page – many thanks.
A few questions though.
1. If I do a search of the calendar so it only shows me specific entries that I’m interested in and then export only the month, I only get the entries I’m interested in for that month -this is great and the desired behavior. Is this possible to achieve this with the year export button, since it appears to always export all entries for the entire year ignoring any search that may have been carried out first.
2. Is it possible to resize the new button so that it matches that of the “export month’s events” (see screen shot).
3. If I view the calendar for any year in the future for example 2017, then the button still says 2016 and exports 2016 data. How can I change this so that it exports the year currently being viewed.Many thanks,
Adam.September 14, 2016 at 2:21 pm #1164243Cliff
MemberAdam,
As these are code snippets to enable additional functionality not built into The Events Calendar itself, they’re a great starting place for any of your own customizations to make what we’ve done even more customized for your usage.
1) This isn’t part of the export’s code, but you could customize it further.
2) The two buttons get the same CSS applied (padding, font-size, etc), it’s just that the button on the top has more text in it so the button is wider. Try this CSS to make them both at least a specific width:
a.tribe-events-button { min-width: 255px; }3) I believe the https://theeventscalendar.com/content/uploads/2016/07/tribe-snippet-ical-export.zip plugin is supposed to be “smart” enough to export the current year’s events (current meaning the year the visitor is currently viewing), but since I noticed it’s not working that way at this time, that’s why I explicitly stated the current year in the button text (current meaning today’s current date).
Again, we provide a few snippets here and there and try to make sure they’re not outright broken or causing problems, but beyond that, we don’t provide any support for them.
I really do hope this does get you really close to your ideal though!
October 6, 2016 at 9:35 am #1173286Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Export entire year to ics file’ is closed to new replies.
