WordPress.org

Ready to get started?Download WordPress

Forums

Adding ajax to my plugin (3 posts)

  1. Nulled_Icode
    Member
    Posted 3 years ago #

    I have been trying lately to develop a plugin. Now i want to add ajax function using jquery .

    I already read and seen all the examples their in the net. and nothing helped me. I want to add the jquery to the public pages and not admin pages.

    When i do so i jQuery.post(); and what i don't know what goes in the url first argument.
    i know that for admin pages it's ajaxurl but if it's public ?

  2. elfin
    Moderator
    Posted 3 years ago #

    I use:
    <?php echo admin_url('admin-ajax.php'); ?>

  3. Nulled_Icode
    Member
    Posted 3 years ago #

    Thanks that really helped me!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.