Wordpress将画廊转换为精美的画廊

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.

I am assuming you want your gallery to be in editor itself..

I just tried in my theme and it worked.

Can you please paste this code in your js file.

$('.entry-content').find('.gallery-columns-1').find('.gallery-icon > a').attr('rel', 'group1');
    $('.entry-content').find('.gallery-columns-2').find('.gallery-icon > a').attr('rel', 'group2');
    $('.entry-content').find('.gallery-columns-3').find('.gallery-icon > a').attr('rel', 'group3');

You can always adjust your div into that...