Title: Dynamically load shortcode through AJAX.
Last modified: August 30, 2016

---

# Dynamically load shortcode through AJAX.

 *  Resolved [sharpe89](https://wordpress.org/support/users/sharpe89/)
 * (@sharpe89)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/dynamically-load-shortcode-through-ajax/)
 * Hi There
 * Many thanks for a fantastic plugin. Saved me a lot of time setting up a CMS for
   my client.
 * On my one page website [http://www.navigatorfp.com](http://www.navigatorfp.com)
   I have insert pages loading specific content for each section / slide however
   the struggle at the moment is page load time as I’m loading a lot of content 
   at one time.
 * I would ideally like to load the content of each shortcode onSlideload. I can
   set up the function of insert something for a specific slide onSlideLoad but 
   not sure of the actual AJAX call to use so I can dynamically load a posts shortcode
   with insert pages.
 * Any help would be greatly appreciated. 🙂
 * Thanks!
    Stephen
 * [https://wordpress.org/plugins/insert-pages/](https://wordpress.org/plugins/insert-pages/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/dynamically-load-shortcode-through-ajax/#post-6224818)
 * Since Insert Pages uses the Shortcode API, it all gets processed when the_content
   filter runs on the initial page load.
    [https://codex.wordpress.org/Shortcode_API](https://codex.wordpress.org/Shortcode_API)
 * If you’d like to do AJAX insertion of content, you’ll want to use jQuery to hook
   into an event (document ready, or onslideload if your slide library provides 
   that event). Then you’ll want to request content via AJAX using $.post(), create
   your PHP function(s) that respond to the AJAX call, and deliver the necessary
   content based on parameters you provide during the AJAX call. More details:
    
   [https://codex.wordpress.org/AJAX_in_Plugins](https://codex.wordpress.org/AJAX_in_Plugins)

Viewing 1 replies (of 1 total)

The topic ‘Dynamically load shortcode through AJAX.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/insert-pages.svg)
 * [Insert Pages](https://wordpress.org/plugins/insert-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-pages/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/dynamically-load-shortcode-through-ajax/#post-6224818)
 * Status: resolved