Trigger CMB2 Multi files
-
Hi,
First off let me apologies if this question have been asked before. I tried looking for it.
I don’t know if you are familiar with CMB2, but I’ve added a Multi Files metabox for creating a image gallery. I’ve added this code to my template-tags.php and content-cpt.php file.
Everything works, the images are outputted to the page. But I can’t find a way to add the data-featherlight trigger. The images gets outputted as img scr and not a href.
The closet I’ve come is to make the div trigger. But it doesn’t trigger the images.
echo '<div class="file-list-image">'; echo '<div data-featherlight>'; echo wp_get_attachment_image( $attachment_id, $img_size ); echo '</div>'; echo '</div>';
I can’t figure out how to add the data-featherlight to the image link markup.
If you have time, do you have any ideas or advice?
Thank you.
- The topic ‘Trigger CMB2 Multi files’ is closed to new replies.