-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best use practice with WordPress? #269
Comments
I made a new lightgallery folder and added: lightgallery.css, lightgallery.min.js and a new file lightgallery-init.js. The init.js file contains: The functions.php file (in the root of the child theme) contains:
} When I get it to work I will add on to this article: |
Hi jQuery(document).ready(function($) { |
@paaljoachim for all images the @Flyingsirkus solution works like charm. |
Hmm could one of you guys post the solution that works. I am just not seeing it - as in not getting it to work correctly yet. Thanks! I am working on Light Gallery working for all images without having to go into each html and add lightgallery inside the div tag. |
@paaljoachim try it like this:
|
Hi Codevz. Thank you. I adjusted the code I am using inside the lightgallery-init.js file, but still no go. If someone could send me the files or paste the procedure they are getting to work here in the thread that would be helpful. As mentioned when I get it to work on my end I will write a tutorial for it. |
@paaljoachim I'm using this and works fine for me: function codevzGallery() {
'use strict';
var a = '.lightbox,a[href$=".jpg"],a[href$=".jpeg"],a[href$=".png"],a[href$=".gif"]',
b = $( 'body' ),
d = b.data( 'lightGallery' );
if ( d ) {
d.destroy( true );
}
if ( $.fn.lightGallery ) {
b.attr( 'data-lightGallery', 1 ).lightGallery( { selector: a } );
}
} and then
|
Hi there, I'm trying to do the same thing, but couldn't figure this out yet.
I must admit I'm quite confused about the steps to follow. Thanks in advance! |
Hey
I am just wondering about best use with WordPress.
Thanks.
The text was updated successfully, but these errors were encountered: