• Hello,

    I’ve been active in wordpress for about 5 months now.

    Now that i’m creating a custom theme i’d like to use nextgen as my source for galleries and lightbox effects.

    However the lightbox effect is not working.

    I’ve tried it all, and googled my arse off for 3 days. Now i’ve decided to place a bet on the support.

    How my html looks like:

    <div id="ngg-image-9" class="ngg-gallery-thumbnail-box">
    		<div class="ngg-gallery-thumbnail">
    			<a href="https://bvanlieshout.com/wp-content/gallery/croatie/IMG_2731.JPG" title=" " data-src="https://bvanlieshout.com/wp-content/gallery/croatie/IMG_2731.JPG" data-thumbnail="https://bvanlieshout.com/wp-content/gallery/croatie/thumbs/thumbs_IMG_2731.JPG" data-image-id="9" data-title="IMG_2731" data-description=" " class="ngg_lightbox">
    								<img title="IMG_2731" alt="IMG_2731" src="https://bvanlieshout.com/wp-content/gallery/croatie/thumbs/thumbs_IMG_2731.JPG" width="120" height="90">
    							</a>
    		</div>
    	</div>

    Yes i have checked the settings in gallery->other options->lightbox effects. It’s set to lightbox. I’ve tried multiple lightboxes.

    checked the path to css/js aswel.

    Now the case is that when i swap to a different theme it DOES work.

    Could anyone please help to guide me through the process of making it work for my custom theme?

    Thank you.

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Have you checked if there is only one jQuery version being loaded? Sometimes, the problem is caused by two versions of jQuery being loaded on the same page (or two versions of the Lightbox library).

    NextGen Gallery does load jQuery, it loads the one bundled with WP. What I have seen is that quite a few Themes load their own jQuery version. So, when NextGen kicks in, two conflicting versions of jQuery exist, and confusion follows for the JavaScript engine (which version of a function to take).

    Happened to me a year ago, took me 3 days to figure out what the problem was.

    Thread Starter bjorn9000

    (@bjorn9000)

    Indeed i have checked.

    Like i said this is a custom theme, and i just started.

    url to where i wanted to have lightbox is :

    https://bvanlieshout.com/?p=6

    Anyway, I just started meaning i have no js/jquery loaded atm.

    Not enqueing any files whatsoever.

    Is there a *sortof* checklist i should work down to make it work?

    Thread Starter bjorn9000

    (@bjorn9000)

    if anyone might wonder

    my css:

    https://www.bvanlieshout.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/jquery.lightbox/jquery.lightbox-0.5.css

    my js:

    https://www.bvanlieshout.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/jquery.lightbox/jquery.lightbox-0.5.min.js
    https://www.bvanlieshout.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/jquery.lightbox/nextgen_lightbox_init.js

    check them, theyre accessible

    EDIT: i have tried to turn off all of my plugins ( it was only 2 of them anyway) without succes

    EDIT 2: I also have cleared my image cache(other options -> misc)/browser cache

    There does not seem to be any version of the lightbox jQuery plugin loaded.

    At the very least, I believe that jquery.lightbox-0.5.min.js should get loaded. Probably nextgen_lightbox_init.js should also get loaded. All the resources required by Lightbox with NextGen should be found under wp/content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static.

    NextGen should load them when you select Lightbox, why it is not there, don’t know.

    Thread Starter bjorn9000

    (@bjorn9000)

    thats what im trying to wrap my mind around.

    Like i said before the paths to the css/js are correct.

    Should i add something in my custom theme? in my header/footer content?

    I honestly have no idea..

    Just to be clear, you are not trying to enqueue/register the lightbox scripts yourself from your theme, right?

    Thread Starter bjorn9000

    (@bjorn9000)

    no, i thought nextgen would do that on its own not?

    All i have in my header is my css, and some mark up thats it.

    Footer has just end taggs

    Do you have a call to wp_footer in your page template? Debugging NextGen, it seems that the enqueuing of the lightbox libraries is done from the wp_footer action hook.

    Thread Starter bjorn9000

    (@bjorn9000)

    son of a b…

    You are totally right.

    I’m using a custom framework that i wrote my self, my footer (footer.php) needs to have <?php wdg::createFooter(); ?> Which i forgot.

    I am sorry, and thank you ph_remy, for your continued help.

    Thank you again,

    Bjorn

    You are welcome. I learned something as well!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘custom theme nextgen lightbox not working’ is closed to new replies.