Title: Shortcode loading text
Last modified: January 26, 2017

---

# Shortcode loading text

 *  [psycic101](https://wordpress.org/support/users/psycic101/)
 * (@psycic101)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/shortcode-loading-text/)
 * Hi guys.
 * I’m working on a plugin that uses a shortcode. The code that runs to produce 
   output for the shortcode can sometimes take a while to complete so currently 
   there is just a blank space on the post until the shortcode returns some text.
 * I have looked around Google (with no success) for some code to implement some“
   loading” text for the shortcode. The idea is that when the page loads, the shortcode
   can display “Loading results” (or similar) until the code has completed at which
   point the “Loading results” text can be replaced with the actual results.
 * I was hoping someone here could provide some boilerplate code for this or point
   me towards some documentation or tutorial that covers this functionality.
 * Thanks

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

 *  [Patrick](https://wordpress.org/support/users/wppatrickk/)
 * (@wppatrickk)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/shortcode-loading-text/#post-8700320)
 * You can insert a loading div like `<div id="loading-div">Loading...</div>` and
   then use the Ajax ‘success’ function to hide this div after the function completes.
 *  Thread Starter [psycic101](https://wordpress.org/support/users/psycic101/)
 * (@psycic101)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/shortcode-loading-text/#post-8700499)
 * Thank you, Patrick. That worked perfectly.

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

The topic ‘Shortcode loading text’ is closed to new replies.

## Tags

 * [plugin-development](https://wordpress.org/support/topic-tag/plugin-development/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [psycic101](https://wordpress.org/support/users/psycic101/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/shortcode-loading-text/#post-8700499)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
