Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1401282

    Dear Support-Team, I am wondering if I could make a Masonry Gallery sortable (as it is possible with the Masonry Blog Post Element). Do you see any chance? I know I can apply categories to images in the media library, can I somehow use them? Or do you have another idea or advice?

    Thanks in advance! All the best, Daniel

    #1401361

    Hey spooniverse,

    Thank you for the inquiry.

    This option is not available with the Masonry Gallery element, unfortunately. It is possible using Isotope and Shuffle scripts, but it will require modifications that are beyond the scope of support. You will have to use the Masonry element instead and create posts for each image if you want the items to be sortable by categories.

    Best regards,
    Ismael

    #1401387

    Hi Ismael, thank you for your answer.

    I was already thinking about building the gallery with the masonry element. Last year I built a masonry element which opens the posts in lightboxes (see here: https://kriesi.at/support/topic/lightbox-for-blog-post-element/). I had a helping hand from @Guenni007.

    All this solution is missing is the navigation from one in a lightbox opened post to the next with some arrows < > as in a normal lightbox gallery. Any idea on how to achieve that?

    All the best, Daniel

    #1401690

    Hi,
    To add a navigation arrow to Guenni007‘s script you would add: gallery:{enabled:true} to it like this:

    function posts_iframe_popup() { 
    ?>
    <script type="text/javascript">
    window.addEventListener('DOMContentLoaded', function() {
    (function($) {
      $(' a.av-masonry-entry').magnificPopup({
        type:'iframe',
    gallery:{
        enabled:true
      }
      }); 
    })(jQuery);
    });
    </script>
    <?php }
    add_action('wp_footer', 'posts_iframe_popup');

    But this opens the masonry item as an iframe and not the image.
    You can change the type to image, but since the image is a background image it will not show in the magnificPopup, I didn’t find a way to get the background image.

    Best regards,
    Mike

    #1402913

    Hey Mike, the line gallery:{ enabled:true } did the trick. The rest I sorted out with a $('…').remove(); and some styling. Works as intended. Thank you! All the best, Daniel

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Sortable Masonry Gallery’ is closed to new replies.