WordPress.org

Forums

NextGEN Gallery
[Plugin: NextGen Gallery] Manually add NextGen Gallery javascript to a new theme (1 post)

  1. mac03f
    Member
    Posted 2 years ago #

    Problem:
    I switched over to a new theme and the NextGen Gallery lightbox no longer works because my portfolio sections are loaded in using Ajax. The creator of the theme suggested that I manually add the java script for NextGen Gallery to the functions.php and then add the CSS to header.php. I have no idea how to do this, nor what piece of java script or css to add.

    To see the issue just go to my site http://www.macrenshaw.com and click on any portfolio piece except for Rekall. When it opens you will see that the images are in order but if you click on one it opens up in the window.

    Here is where I'm supposed to add the java script from functions.php:

    function sf_load_js() {
    
        if ( ! is_admin() ) {
            wp_deregister_script('jquery');
        }
    
        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
        wp_register_script('smoothscroll', get_template_directory_uri() . '/js/jquery.smooth-scroll.min.js', 'jquery', '1.0', TRUE);
        wp_register_script('flexslider', get_template_directory_uri() . '/js/jquery.flexslider.js', 'jquery', '1.0', TRUE);
        wp_register_script('quicksand', get_template_directory_uri() . '/js/jquery.quicksand.js', 'jquery', '1.0', TRUE);
        wp_register_script('easing', get_template_directory_uri() . '/js/jquery.easing.1.3.js', 'jquery', '1.3', TRUE);
        wp_register_script('jqueryUI', get_template_directory_uri() . '/js/jquery-ui-1.8.17.custom.min.js', 'jquery', '1.8.17', TRUE);
        wp_register_script('prettyPhoto', get_template_directory_uri() . '/js/jquery.prettyPhoto.js', 'jquery', '1.0', TRUE);
        wp_register_script('jplayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js', 'jquery', '1.0', TRUE);
        wp_register_script('respond', get_template_directory_uri() . '/js/respond.min.js', 'respond', '1.0', TRUE);
        wp_register_script('viewport', get_template_directory_uri() . '/js/jquery.viewport.mini.js', 'viewport', '1.0', TRUE);
        wp_register_script('cycle', get_template_directory_uri() . '/js/jquery.cycle.all.js', 'cycle', '1.0', TRUE);
        wp_register_script('functions', get_template_directory_uri() . '/js/functions.js.php', 'jquery', '1.0', TRUE);
    
        wp_enqueue_script('jquery');
        wp_enqueue_script('smoothscroll');
        wp_enqueue_script('flexslider');
        wp_enqueue_script('quicksand');
        wp_enqueue_script('easing');
        wp_enqueue_script('jqueryUI');
        wp_enqueue_script('prettyPhoto');
        wp_enqueue_script('jplayer');
        wp_enqueue_script('respond');
        wp_enqueue_script('viewport');
        wp_enqueue_script('cycle');
    
        if ( ! is_admin() ) {
            wp_enqueue_script('functions');
        }
    }

    Thank you for any help given.

    http://wordpress.org/extend/plugins/nextgen-gallery/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic