Title: do_shortcode in ajax callback function
Last modified: June 6, 2018

---

# do_shortcode in ajax callback function

 *  [Pragyan Ratna](https://wordpress.org/support/users/ratnapragyan/)
 * (@ratnapragyan)
 * [8 years ago](https://wordpress.org/support/topic/do_shortcode-in-ajax-callback-function/)
 * Hi,
    I am unable use `do_shortcode` in ajax callback function. The shortcode 
   works outside ajax callback function. But i need to call it from inside ajax.
   I searched this problem and came to know that this is issue with WordPress. Can
   any one suggest how can i use `do_shortcode` inside ajax callback function.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [8 years ago](https://wordpress.org/support/topic/do_shortcode-in-ajax-callback-function/#post-10370155)
 * Call the shortcode handler function directly, echoing out its return.

Viewing 1 replies (of 1 total)

The topic ‘do_shortcode in ajax callback function’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/do_shortcode-in-ajax-callback-function/#post-10370155)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
