Adresse
Webers Webdesign
Ludwig-Schopp-Straße 27
53117 Bonn
a custom class to the masonry : mixed-contenttype
declare custom-links to those images ( video or website urls)
choose lightbox and on link settings – image link : „use custom link and fallback is image“
function lightbox_with_mixed_content_type() {
?>
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", function () {
(function($){
$('.av-masonry.mixed-contenttype .av-masonry-entry').each(function(){
if( $(this).filter('[data-av-masonry-custom-link]').length!==0 ){
$(this).attr('rel', 'lightbox').addClass('mfp-iframe');
}
});
})(jQuery);
});
</script>
<?php
}
add_action('wp_footer', 'lightbox_with_mixed_content_type', 999);