visual composer – bbird.me http://bbird.me WordPress quick tips Wed, 08 Aug 2018 16:39:07 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.8 How to disable (and replace) Visual Composer lightbox http://bbird.me/disable-replace-visual-composer-lightbox/ http://bbird.me/disable-replace-visual-composer-lightbox/#comments Tue, 06 Sep 2016 08:47:52 +0000 http://bbird.me/?p=537 One of the reasons you might want to replace Visual Composer lightbox (it is using prettyPhoto actually) is because of

Post How to disable (and replace) Visual Composer lightbox je prvi puta viđen na bbird.me.

]]>
One of the reasons you might want to replace Visual Composer lightbox (it is using prettyPhoto actually) is because of the mobile view where images opened using the effect are so small that you can hardly see or scroll through them.

Several people have asked about this on official Visual Composer website, but they only gave short answers which may be difficult to grasp for whoever isn’t a programmer. In short, this is how you do it – please note that this works for versions up to 4.x.x so if this is not working for versions 5.x.x (version 5 is not yet released as of this writing, nor there are any special information about it, but just to be on the safe side), feel free to post in the comments so I could remove this article. But until then, I hope some of you will find it useful.

So this is how it goes:

First, you’ll want to put the following code into functions.php of your parent or child theme:

function remove_vc_scripts(){
wp_enqueue_script('prettyphoto' );
wp_deregister_script('prettyphoto' );
}

add_action( 'wp_enqueue_scripts', 'remove_vc_scripts', 100 );

After you have done it, prettyPhoto is disabled. Now it’s time to pick another lightbox and this is one of the solutions I definitely recommend – Responsive Lightbox by dFactory. But given that VC adds rel=”prettyPhoto” attribute, you’ll want to set the new lightbox like this, making sure that you name the correct Selector:

That’s it!

Post How to disable (and replace) Visual Composer lightbox je prvi puta viđen na bbird.me.

]]>
http://bbird.me/disable-replace-visual-composer-lightbox/feed/ 23