Answer the question
In order to leave comments, you need to log in
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
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');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question