WordPress.org

Ready to get started?Download WordPress

Forums

If is this plug-in page (7 posts)

  1. danielmichel
    Member
    Posted 1 year ago #

    How do i load a certain javascript file only if you are in the plugin page i want to load it from?

  2. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    Are you trying to add a plugin or a javascript file?

  3. danielmichel
    Member
    Posted 1 year ago #

    Im trying to load a javascript file from my plugin's /js/ directory from my plugin page, and only on my plugin page, as when the plugin is activated, it loads the JS file everywhere in admin.

  4. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

  5. danielmichel
    Member
    Posted 1 year ago #

    I am enqueueing the script.
    I'm asking how.

    if(is_plugin_page(''mypluginpage')) {
    wp_enqueue_script() load the javascript
    }

  6. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    I tagged this so someone who knows about this can drop in.

  7. danielmichel
    Member
    Posted 1 year ago #

    Thanks, friend.

Topic Closed

This topic has been closed to new replies.

About this Topic