Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • How to Use AJAX in a WordPress Shortcode?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 7
    Comment on it

    Hello!

    To call a shortcode via AJAX in WordPress, first we required a shortcode, so to create a shortcode in wordpress, we are going to use wordpress built-in shortcode API to create shortcode

    // Create shortcode

    The shortcode API call to register the shortcode handler would look something like this:

    add_shortcode( 'get_user_list', 'getUserList');

    here "get_user_list" is the name of the shortcode we will use in our ajax call and "getUserList" is the name of function shortcode call automatically whenever we hit the shortcode via ajax.

    Wordpress Wordpress ShortCodes

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: