WordPress.org

Ready to get started?Download WordPress

Forums

wp_enqueue_script not adding my script (4 posts)

  1. toddysm
    Member
    Posted 3 years ago #

    Hi,

    My goal is to include Google Maps JavaScript in a particular admin page. I tried playing with local scripts on the particular php page as well as on admin index.php but it seems the following code does not include the local script even.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Is there anything that I am missing? Why isn't the script included in the resulting HTML?

    Thanks!

  2. Tara
    Member
    Posted 3 years ago #

  3. toddysm
    Member
    Posted 3 years ago #

    It seems to work if I use the admin_init action. So far I've been using admin_print_scripts action and it wasn't working.

    I am not sure I am clear when should I use the one vs the other. Is there any documentation that describes in what situations should those be used?

    Thank you!

  4. Tara
    Member
    Posted 3 years ago #

    see if these threads help.

Topic Closed

This topic has been closed to new replies.

About this Topic