Title: exclude javascript from theme files
Last modified: August 21, 2016

---

# exclude javascript from theme files

 *  Resolved [disagree](https://wordpress.org/support/users/disagree/)
 * (@disagree)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/exclude-javascript-from-theme-files/)
 * Is there an option to exclude the rpx javascript from theme files? E.g. I just
   want to use it on the wp-login form, and would like to reduce the heavy external
   javascript footprint on the frontend.
 * There are some options to do that like : [http://wordpress.stackexchange.com/questions/12863/check-if-were-on-the-wp-login-page](http://wordpress.stackexchange.com/questions/12863/check-if-were-on-the-wp-login-page)
 * but what i’d like to know is if that’s built in already, e.g. an advanced option
   checkbox that when set, would only include RPX/Engage on the login pages and 
   administration, but not the frontend
 * cheers
 * [http://wordpress.org/plugins/rpx/](http://wordpress.org/plugins/rpx/)

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

 *  Thread Starter [disagree](https://wordpress.org/support/users/disagree/)
 * (@disagree)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/exclude-javascript-from-theme-files/#post-4001377)
 * ( wrong wording; with theme files i meant frontend pages generated by the theme)
 *  Thread Starter [disagree](https://wordpress.org/support/users/disagree/)
 * (@disagree)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/exclude-javascript-from-theme-files/#post-4001460)
 * This could maybe be accomplished by hooking it up to
 * `add_action('login_init', 'functionname');`
    and `add_action('admin_init', 'functionname');`
 * instead of `add_action('init', 'functionname');` which does it globally
 *  [juanm_janrain](https://wordpress.org/support/users/juanm_janrain/)
 * (@juanm_janrain)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/exclude-javascript-from-theme-files/#post-4001506)
 * Hi, disagree. There’s currently no built-in option to exclude the JavaScript 
   block on pages that don’t contain the login. Thankfully, the JS is pretty persistent
   in cache (good for end users, a bit inconvenient for when you’re making/testing
   setting changes) so the impact isn’t high. But, this is a good idea. I’m going
   to submit this as a feature request to our Product team.
 *  Thread Starter [disagree](https://wordpress.org/support/users/disagree/)
 * (@disagree)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/exclude-javascript-from-theme-files/#post-4001580)
 * check out the plugin ‘Typekit’, they have very nice options regarding that
 * [http://s.stefanxo.com/oBu.png](http://s.stefanxo.com/oBu.png)

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

The topic ‘exclude javascript from theme files’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/rpx.svg)
 * [Janrain Social Login](https://wordpress.org/plugins/rpx/)
 * [Support Threads](https://wordpress.org/support/plugin/rpx/)
 * [Active Topics](https://wordpress.org/support/plugin/rpx/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rpx/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rpx/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [disagree](https://wordpress.org/support/users/disagree/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/exclude-javascript-from-theme-files/#post-4001580)
 * Status: resolved