Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5734

    Hey all,

    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,

    JD

    #51562

    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


    my_lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox']");

    and change it to:



    var nolightbox = jQuery('.home');

    if(!nolightbox.length)
    {
    my_lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox']");
    }

    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 ');

    #51563

    Hi Kriesi

    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.

    Thanks

    Shane

    #51564

    Hey,

    the code is located in js/avia.js

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How do I remove Lightbox on specific pages.’ is closed to new replies.