The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Using WP Ajax in Plugin (2 posts)

  1. 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!

  2. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic