Title: NextGEN adding scripts to iframe
Last modified: August 22, 2016

---

# NextGEN adding scripts to iframe

 *  [incellion](https://wordpress.org/support/users/incellion/)
 * (@incellion)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/nextgen-adding-scripts-to-iframe/)
 * I’ve encountered strange behavior. Some time ago I created a widget (theme widget)
   that reads a content from a 3rd party site, modifies it a bit (adds some styling)
   and puts modified content in an iframe on a page. Because iframe content is put
   asynchronously, I call wp-load.php inside php file that outputs iframe content.
   
   Everything worked as it suppose to, along with NextGEN Gallery 1.9.12. I’ve updated
   NextGEN plugin to the latest version (2.0.66.17) and the widget got broken. For
   some reason, when wp-load is called, the NG plugin fires WP ‘init’ action, so
   all my scripts (theme styling) enqueued in a function hooked to WP ‘init’ event
   are added to that iframe content. Is there any way to disable that ‘feature’?
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/nextgen-adding-scripts-to-iframe/#post-5200702)
 * [@incellion](https://wordpress.org/support/users/incellion/) – Although I cannot
   guarantee it will work, have you tried defining `NGG_SKIP_LOAD_SCRIPTS` to true
   for your widget only?
 * – Cais.

Viewing 1 replies (of 1 total)

The topic ‘NextGEN adding scripts to iframe’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [init](https://wordpress.org/support/topic-tag/init/)
 * [nextgen](https://wordpress.org/support/topic-tag/nextgen/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 1 reply
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/nextgen-adding-scripts-to-iframe/#post-5200702)
 * Status: not a support question