jQuery lightGallery

[lightgallery]
[lgallery]z_karaoke z_x360_minipcie 13disney134-1024x576 13disney106-1024x576[/lgallery]
For this demo page –

-shortcode for bootstrap collapsible scripts

-shortcode for lightGallery scripts

<div id=”lightgallery” class=”list-unstyled row”>

-Images with thumbnails – I made thumbnails as small as possible.

-use data-sub-html=”
&lt;p&gt;this is the title.&lt;/p&gt;
&lt;p&gt;” after the href= for caption.

</div>

-close bootstrap collapsible shortcode

  • Create a lightgallery.php for shortcode

 <?php
add_shortcode( ‘mygallery’, ‘mygalleryscript’ );
function mygalleryscript() {
return
‘<link href=”/idogjs/lightGallery/dist/css/lightgallery.css” rel=”stylesheet”><script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js”></script><script src=”/idogjs/lightGallery/dist/js/lightgallery.js”></script><script src=”/idogjs/lightGallery/dist/js/lg-fullscreen.js”></script><script src=”/idogjs/lightGallery/dist/js/lg-thumbnail.js”></script><script src=”/idogjs/lightGallery/dist/js/lg-autoplay.js”></script><script src=”/idogjs/lightGallery/dist/js/lg-zoom.js”></script><script src=”/idogjs/lightGallery/dist/js/lg-hash.js”></script><script src=”/idogjs/lightGallery/dist/js/lg-pager.js”></script><script src=”/idogjs/lightGallery/lib/jquery.mousewheel.min.js”></script><script type=”text/javascript”>
var $jG=jQuery.noConflict();
$jG(document).ready(function(){
});
</script>
<script src=”/idogjs/lightGallery/dist/js/idogGallery.js”></script>’
; }

  • Include in theme function.php

include ‘lightgallery.php’;

  • Make sure all the scripts are in the correct folder url.

Pages: 1 2

Leave a Reply

Your email address will not be published. Required fields are marked *