Title: Call Shortcode functions directly
Last modified: August 31, 2016

---

# Call Shortcode functions directly

 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/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/](https://wordpress.org/plugins/event-organiser/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenharris/)
 * (@stephenharris)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-functions-directly/#post-7074490)
 * There is this function: [http://codex.wp-event-organiser.com/function-eo_get_event_fullcalendar.html](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….
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-functions-directly/#post-7074496)
 * 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.
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-functions-directly/#post-7074578)
 * 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.

 * ![](https://ps.w.org/event-organiser/assets/icon-256x256.png?rev=978123)
 * [Event Organiser](https://wordpress.org/plugins/event-organiser/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/event-organiser/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/event-organiser/)
 * [Active Topics](https://wordpress.org/support/plugin/event-organiser/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-organiser/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-organiser/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 3 replies
 * 2 participants
 * Last reply from: [jordesign](https://wordpress.org/support/users/jordesign/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-functions-directly/#post-7074578)
 * Status: not resolved