Support » Plugin: Event Organiser » Call Shortcode functions directly

  • Hi Stephen,
    I’m just wondering if there is a way I can call the function for the Full Calendar directly, rather than having to use a do_shortcode(); to output it?

    I’m interested in building an ajax view switcher, so want to call the calendar content dynamically (but an ajax call won’t process the shortcode).

    https://wordpress.org/plugins/event-organiser/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    There is this function: http://codex.wp-event-organiser.com/function-eo_get_event_fullcalendar.html.

    But I don’t think you’ll get that work in an ajax context (i.e. trying to render the calendar in a page / part of a page rendered by ajax). There is actually very little HTML initially rendered, the rest is done via JavaScript.

    FullCalendar has its own API for implementing a view switcher if that’s all you need to do….

    Thanks Stephen,
    I’m trying to figure out if I can switch between Calendar/List/Posterboard views without loading new pages.

    But it is looking like that will be tricky, Will definitely be using the default view switching on the calendar itself though – very nice.

    Hey Stephen,
    if the FullCalendar is being initialized by Javascript,
    could I delay the initialisation until a user action?

    So have the container in place,
    but not create the calendar until the user clicked a button?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Call Shortcode functions directly’ is closed to new replies.