• Resolved Roland

    (@rolandriddell)


    I would like to use the Add to Calendar Button plugin to add a “Save to calendar” link for each event. Is it possible to use shortcodes to populate the button data (e.g. event start date)?

    For example:

    <add-to-calendar-button
    name="[eo_event_name]"
    startDate="[eo_start_date]"
    startTime="[eo_start_time]"
    endTime="[eo_end_time]"
    ></add-to-calendar-button>

    Thanks!

    • This topic was modified 2 months, 3 weeks ago by Roland.
Viewing 1 replies (of 1 total)
  • Thread Starter Roland

    (@rolandriddell)

    I was able to get it working by adding the button to the single event template (example below)

    <add-to-calendar-button
    name="<?php echo get_the_title( $post->ID ) ?>"
    startDate="<?php echo eo_get_the_start( 'Y-m-d' ); ?>"
    startTime="<?php echo eo_get_the_start( 'H:i' ); ?>"
    endTime="<?php echo eo_get_the_end( 'H:i' ); ?>"
    timeZone="America/Los_Angeles"
    location="World Wide Web"
    description="Check out the maybe easiest way to include Add to Calendar Buttons to your web projects:[br]→ [url]https://add-to-calendar-button.com/|Click here![/url]"
    options="'Apple','Google','iCal','Outlook.com','Microsoft 365','Microsoft Teams','Yahoo'"
    lightMode="bodyScheme"
    ></add-to-calendar-button>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.