The theme includes the whole light Gallery but I can't use even the simplest one.
id="lightgallery" doesn't work, even when I use the id="album-media-collection" I can't add more than one image.
And hey I have add some lightGalery functions to a js file.
And also when I turn off the whole function in script.js line 2143 and load mine it does not work.
How can I use lightGallery like normal from anywhere (posts, pages etc.)?
Comments
What you want exactly to change from default behaviour? And why would you remove our version of lightGallery and insert yours?
With kind regards.
The normal way is to do it with a div-tag with the id="lightgallery" after that the a-tag with the image.
The theme allows only the id-tag "album-media-collection" inside a ul-tag - than li - than the image.
.lightGallery
You also add it as
else
condition for above code, so it wont interfere with albums.With kind regards.
But I will NOT change the parent files. Is there a way to include this in a child js or in the child function.php?
This than will work:
div id="lightgallery"
a href="img"
/div
This not:
div id="lightgallery"
a href="img"
a href="img"
a href="img"
a href="img"
/div
Sorry for this kind of "code" but I can't insert a code to be shown.
if(!function_exists('lightbox : function()')){
lightbox : function(){
//if no lightbox script do nothing
//Using lightGallery ?
...
pre
andcode
HTML tags( https://css-tricks.com/posting-code-blocks-wordpress-site/ )I have answered it here http://support.apollo13.eu/discussion/4059/modifying-js-files - Never done it before.
I don't have a clue what you are trying to do in your second post.
With kind regards.