Title: Code Mod &gt; Loading assets only on the plugin admin pages
Last modified: August 30, 2016

---

# Code Mod > Loading assets only on the plugin admin pages

 *  Resolved [noahj-champion](https://wordpress.org/support/users/noahj-champion/)
 * (@noahj-champion)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/code-mod-loading-assets-only-on-the-plugin-admin-pages/)
 * Hi,
 * Great plugin!
 * I just wanted to send you this concept, maybe you can tweak it a bit, if needed.
 * I tried a couple solutions and couldn’t get your plugin asset files to only load
   on it’s admin pages. Well, I did get one solution, the one that works without
   fail. So I wanted to provide you that code, because the assets truly only need
   to load on the plugin admin pages, since the plugin is only used on those pages.
 * See the code difference @ [https://www.diffchecker.com/d7rj3wbd](https://www.diffchecker.com/d7rj3wbd)
 * Thoughts?
 * [https://wordpress.org/plugins/media-from-ftp/](https://wordpress.org/plugins/media-from-ftp/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Katsushi Kawamori](https://wordpress.org/support/users/katsushi-kawamori/)
 * (@katsushi-kawamori)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/code-mod-loading-assets-only-on-the-plugin-admin-pages/#post-6648819)
 * Hi Noahj Champion,
 * Thank you for a very meaningful hack.
    It is also available to my other plug-
   ins. Thank you very much. I will issue a modified version in the near future.
 * There is an error in the 13 Line.
    False || $ _GET [‘page’] == ‘mediafromftp-
   seearch-register’ True || $ _GET [‘page’] == ‘mediafromftp-search-register’
 *  Thread Starter [noahj-champion](https://wordpress.org/support/users/noahj-champion/)
 * (@noahj-champion)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/code-mod-loading-assets-only-on-the-plugin-admin-pages/#post-6648874)
 * Katsushi,
 * You’re welcome and thanks for the update!
 * There are many other ways you can do this too.
 * Here is the main reference link from WP Tuts
    @ [http://code.tutsplus.com/articles/quick-tip-conditionally-including-js-and-css-with-get_current_screen–wp-25378](http://code.tutsplus.com/articles/quick-tip-conditionally-including-js-and-css-with-get_current_screen–wp-25378)
 * There are some ideas in there as well. But if you want to know some other methods,
   some that might suit your personal way of coding better, let me know your email
   and I will send you some.
 * Normally, looking at other plugins you can find other ways.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Code Mod > Loading assets only on the plugin admin pages’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/media-from-ftp_d27e1b.svg)
 * [Media from FTP](https://wordpress.org/plugins/media-from-ftp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-from-ftp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-from-ftp/)
 * [Active Topics](https://wordpress.org/support/plugin/media-from-ftp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-from-ftp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-from-ftp/reviews/)

## Tags

 * [assets](https://wordpress.org/support/topic-tag/assets/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)

 * 2 replies
 * 2 participants
 * Last reply from: [noahj-champion](https://wordpress.org/support/users/noahj-champion/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/code-mod-loading-assets-only-on-the-plugin-admin-pages/#post-6648874)
 * Status: resolved