how to deregister fancybox on home page ?
-
hi i am running easyfancybox plugin
i want to run fancybox only in (is_single & is_page )
i used this
<?php if ( is_single() ) wp_enqueue_script( 'fancybox' ); ?> <?php if ( is_single() ) wp_enqueue_style( 'fancybox' ); ?>
but fancybox css style sheet still showing on home page
plugins/easy-fancybox/easy-fancybox.css.php?ver=1.3.4
i also want to deregister this code on home page (body )
<!– Easy FancyBox 1.3.4.9 using FancyBox 1.3.4 – RavanH (https://4visions.nl/en/wordpress-plugins/easy-fancybox/) –><script type="text/javascript"> /* <![CDATA[ */ jQuery(document).ready(function($){ var fb_timeout = null; var fb_opts = { 'overlayShow' : false, 'overlayColor' : 0.1, 'centerOnScroll' : true, 'showCloseButton' : true, 'showNavArrows' : true, 'changeFade' : 200, 'onCleanup' : function() { if(fb_timeout) { window.clearTimeout(fb_timeout); fb_timeout = null; } } }; /* IMG */ var fb_IMG_select = 'a[href$=".jpg"]:not(.nofancybox),a[href$=".JPG"]:not(.nofancybox),a[href$=".gif"]:not(.nofancybox),a[href$=".GIF"]:not(.nofancybox),a[href$=".png"]:not(.nofancybox),a[href$=".PNG"]:not(.nofancybox)'; $(fb_IMG_select).addClass('fancybox').attr('rel', 'gallery'); $('a.fancybox, area.fancybox').fancybox( $.extend({}, fb_opts, { 'transitionIn' : 'none', 'transitionOut' : 'none', 'opacity' : true, 'titleShow' : true, 'titlePosition' : 'over', 'titleFromAlt' : true }) ); }); /* ]]> */ </script>
i fount this in file
but dont know how to deregister it
// begin output FancyBox settings echo ' <script type="text/javascript"> /* <![CDATA[ */ jQuery(document).ready(function($){ var fb_timeout = null;'; --blaa blaa blaa - /* ]]> */ </script>
- The topic ‘how to deregister fancybox on home page ?’ is closed to new replies.