Support » Fixing WordPress » Using WP Ajax in Plugin

  • Resolved Josh


    Hi.. been banging my head against the wall.. hoping one good “bang” will make this code work.

    If anyone can help… thanks!!

    Here is the javascript I’m using:

    And here is the function in my plugin file:

    I can get the js alert to display the serialized array… I just can’t get the ajax to load it back into the plugin admin screen.

    Any help is appreciated!

Viewing 1 replies (of 1 total)
  • I got it.

    I found out that you have to put your add_action('wp_ajax_... bit at the top level of your plugin. I had it nested inside my admin_menu hook, which didn’t work.

Viewing 1 replies (of 1 total)
  • The topic ‘Using WP Ajax in Plugin’ is closed to new replies.