WordPress.org

Ready to get started?Download WordPress

Forums

FancyBox for WordPress
[resolved] How to turn off Fancybox on one page with NextGen Gallery? (4 posts)

  1. figaro1818
    Member
    Posted 2 years ago #

    I'm using NextGen Gallery Version 1.9.3 for our images and Slimbox Plugin Version 1.3 for the overlay and animation on it. However, I'm using Fancybox for WordPress Version 3.0.1 on another page for our videos. Apparently, Fancybox is automatically overriding Slimbox and the gallery keeps popping up using Fancybox. I'd love to use Fancybox with NextGen Gallery, but when there is more than one gallery on a page they run together instead of remaining individual galleries. So is there a way I can turn off the auto-detect for Fancybox? Any help or direction, even if it's a deadend, would be very appreciated.

    http://wordpress.org/extend/plugins/fancybox-for-wordpress/

  2. ckeseling
    Member
    Posted 1 year ago #

    I have the same question. This post says "resolved" but there's no answer posted??

  3. abdessamad idrissi
    Member
    Posted 1 year ago #

    Check this link and this one too.

    this is what I'm using;

    function np2013_disable_scripts() {
    	// Disable fancybox-for-wordpress on non blog categories
    	if ( !in_category( 'blog' ) ) {
    		remove_action('wp_head', 'mfbfw_init');
    		remove_action('wp_enqueue_scripts', 'mfbfw_scripts');
    		remove_action('wp_enqueue_scripts', 'mfbfw_styles');
    		remove_action('init', 'mfbfw_register_scripts');
    		wp_dequeue_style( 'fancybox' );
    		wp_deregister_script( 'fancybox' );
    	}
    }
    add_action('wp_head', 'np2013_disable_scripts', 1);
  4. abdessamad idrissi
    Member
    Posted 1 year ago #

    Another variation would be:

    function np2013_disable_scripts() {
    	// Disable fancybox-for-wordpress on non blog categories
    	if ( !in_category( 'blog' ) ) {
    		remove_action('wp_head', 'mfbfw_init');
    		remove_action('wp_enqueue_scripts', 'mfbfw_scripts');
    		remove_action('wp_enqueue_scripts', 'mfbfw_styles');
    		remove_action('init', 'mfbfw_register_scripts');
    		wp_deregister_script( 'fancybox' );
    		wp_dequeue_style( 'fancybox' );
    	}
    		remove_action('wp_enqueue_scripts', 'mfbfw_styles');
    
    	// Disable supersized on celan  page
    	if ( is_page_template( 'clean.php' )  ) {
    		wp_deregister_script( 'np2013_supersized' );
    		wp_dequeue_style( 'np2013_supersized_css' );
    	}
    
    }
    add_action('wp_head', 				'np2013_disable_scripts');
    add_action('wp_print_styles', 		'np2013_disable_scripts');
    add_action('wp_enqueue_scripts', 	'np2013_disable_scripts');

    but still it can't remove this two styles;

    <style type="text/css">
    		#fancybox-close{:-15px;:-15px}
    						div#fancybox-outer{background-color:}
    			</style>

    in the fancybox.php this line should is making the problem above:
    add_action( 'wp_enqueue_scripts', 'mfbfw_styles' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic