In my Wordpress theme I have a gallery and I want to make the gallery into a lightbox / fancybox gallery the code in the theme is as below:
$out .= get_the_post_thumbnail();
I have tried many variations on the web but they all result in losing the gallery totally or give me a fatal error message. I am thinking something along the lines of this code to fix it, im not great with PHP
$out .= get_the_post_thumbnail(array('data-src' => ""thumbnail.url"" data-fancybox));
Thank you in advance.