If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
I’ve been doing a bit of searching but am not completely clear as to how I can remove the Lightbox effect on specific pages.
For example I’d like to shut the Lightbox effect off on the home page and some of the portfolio pages.
Thanks for the help,
Unfortunatley there is no easy dynamic way to pull this off.
you would need to check on which page you are and then add a rule for that page manually.
an example: each page gets unqiue body classes appended. so for example the frontpage gets the class home:
now in your custom.js file at the very top search for
and change it to:
var nolightbox = jQuery('.home');
if you want to exclude the page with id 12 and the home page for example the nolightbox var would read:
var nolightbox = jQuery( '.home, .page-id-2 ');
I want to do the same thing for my brightbox theme as I believe there’s a conflict with another plugin I want to use. Just wondering about the custom.js file you mentioned. I can’t seem to find that file anywhere.
The topic ‘How do I remove Lightbox on specific pages.’ is closed to new replies.