Support

Home Forums Event Espresso Premium Add to Calendar

Add to Calendar

Posted: July 26, 2016 at 1:24 pm

Viewing 8 reply threads


Maccabee Levine

July 26, 2016 at 1:24 pm

Is it possible to add the words “Add to Calendar” next to the icon and can I add the word “Friday, ” so it appears as Friday, September 9, 2016.

See screeshot: http://www.esu.edu/images/wordpress/event-test6.jpg


Lorenzo Orlando Caum

  • Support Staff

July 27, 2016 at 4:35 am

Hello,

This custom CSS should add that messaging:

a.espresso_ical_link:after { content: ' Add to Calendar'}

If you would like to make the addition specific to the page, then you can also add a body class. Here is an example:

.page-id-4 a.espresso_ical_link:after { content: ' Add to Calendar'}

Otherwise, you could create a custom template through the templates files for the event listings page:

event_list_display.php

event_list.php


Lorenzo


Maccabee Levine

July 27, 2016 at 5:59 am

Thanks for that Lorenzo. What about adding “Friday” to the date?


Tony

  • Support Staff

July 27, 2016 at 6:08 am

EE uses the date format set for your site within Dashboard -> Settings -> General -> Date Format.

Right now you have it set to ‘F j, Y’, to include the Day of the week the way you have request that would need to be ‘l, F j, Y’.

However note that setting applies to the output of ALL dates shown on your site, not just within EE. To change the output of the date on only the EE event list your would need to create your own event_list_display.php template mentioned above that passes the specific date format you want use for that output only.


Maccabee Levine

July 27, 2016 at 6:40 am

Thank you


Tony

  • Support Staff

July 27, 2016 at 6:44 am

You’re most welcome 🙂


Maccabee Levine

July 27, 2016 at 7:02 am

Sorry, have another question. Can I independently add the “Add to Calendar” icon in the sidebar using a shortcode?


Tony

  • Support Staff

July 28, 2016 at 4:15 am

Currently there is no shortcode to generate the ical for an EE event.

If you take a look within \event-espresso\includes\functions\ical.php you’ll find the function used to generate the ical icon called – espresso_ical_prepare_by_meta

That hooks into ‘filter_hook_espresso_display_ical’ to run the function and is passed the $all_meta array which is generated from the event details. $all_meta is only available witin certain sections of EE template (Take a look within the registration_page.php template for en example)

To build your own shortcode your going to need to copy that function, pull in the information used within that function manually and then output the ical using that new function in your shortcode.


Maccabee Levine

July 28, 2016 at 6:05 am

Oh boy.

Viewing 8 reply threads

The support post ‘Add to Calendar’ 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.

Event Espresso