S
S
sitepro2018-09-06 00:32:22
css
sitepro, 2018-09-06 00:32:22

How to disable lightboxes on the website for Wordpress images?

Hello everybody. Who can tell me how to correctly disable lightboxes on the site for images. I tried to remove the ghtbox-image.active classes in style.css and style.min.css blocks, it doesn't help. Maybe some kind of function.php code or something else? Who faced and who knows how to do it. I would be grateful for any advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-09-06
@azerphoenix

Hello!
It depends on what exactly these lightboxes will add...
It can be a plugin or a theme... And then, for example, in the console you can look at the handler that is set to click on the image, find the script, install the Query Monitor plugin, find the handle of this script, and further add to functions.php:

functions disableLightBox() {
wp_deregister_script('HANDLE');
wp_dequeue_script('HANDLE');
}
add_action('wp_enqueue_scripts', 'disableLightBox');

PS do not forget to replace handle with the one you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question