WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

NGG Video Extend

Addon plugin for Nextgen Gallery that adds the ability to have video lightboxes

To make sure that NGG Video Extend only loads on the gallery pages it needs to, add the following code to your template's functions.php:

// Restrict NGG Video Extend javascript to ONLY the page(s) it needs to

add_action( 'wp_print_scripts', 'nggve_deregister_javascript', 100 );
function nggve_deregister_javascript() {
    if ( ! is_singular(array( 'my-gallery' ))  ) {
        wp_deregister_script( 'ngg-video-extend' );
    }
}

Explanation: Basically this code reads -

do the following stuff:
    if not the singular page/post "My Gallery"
    then don't use the NGG Video Extend script.

'my-gallery' is the page slug of the page you used the NextGEN Gallery shortcode on.

If you have more than one page that you need to load it on, change the 3rd line to:

if ( ! is_singular(array( 'my-gallery', 'second-gallery', 'photos' ))  ) {

Where 'my-gallery', 'second-gallery' etc are the page slugs of the pages/posts you want to use.

Please note that this will get rid of the script on things like category view pages and thus post exerpts etc. If you want slightly different functionality (such as only working on certain categories, everything except the main page etc), you will need to change the ! is_singular. You can read about WP Conditional Tags here: http://codex.wordpress.org/Conditional_Tags.

Requires: 3.0 or higher
Compatible up to: 3.1.4
Last Updated: 2011-12-12
Downloads: 15,022

Ratings

3 stars
3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,2,2 50,2,1
50,2,1 100,2,2 100,1,1
100,1,1
50,2,1
0,1,0
0,1,0
50,2,1
0,2,0