[gallery link="file"]
group
-attribute:
[gallery link="file" ids="1,2,3" group="mon"]
[gallery link="file" ids="4,5,6" group="tue"]
rel="lightbox"
attribute to any link tag to activate the lightbox. For example:
<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
Optional: Use the title
attribute if you want to show a caption.
<a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
<a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
<a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>
No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!rel="nobox"
data-download
-attribute to set a custom download link:
<a href="image-medium.jpg" rel="lightbox" data-download="image-superlarge.jpg"> [...] </a> doLightbox();
whenever it loads new content. Most plugins have a setting
for code that is called after each new page is loaded - just give it this:
if(typeof doLightBox !== 'undefined' && typeof jQuery !== 'undefined'){
doLightBox();
}
If you have problems with WP jQuery Lightbox, please make sure you try these steps before asking for help. If you ask for help and I find any of these steps would fix the problem, I will just link you back here to do the work yourself.
wp_header();
just before the closing </head>
tag of your theme, or you will break many plugins, which generally use this hook to reference JavaScript fileswp_footer();
, just before the closing </body>
, for the same reasonwp_localize_script()
, used to configure this plugin and many others.