Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1203038

    Is there a way to show Masonry Gallery ‘sort options’ down the side of the gallery, rather than only at the top?

    I currently have a gallery linking to portfolios on my website that are sorted into separate portfolio categories which I then have on the gallery as a ‘sort option’ I’d love the option of having this menu of ‘sort options’ down the side of my page as it’ll become a little unweildy to have more than a few all listed at the top of the gallery.

    • This topic was modified 4 years, 7 months ago by duncast.
    #1203204

    Hey duncast,

    I think that would be difficult since the element is full width, I would advice that you keep it as it is. The CSS to create what you want would likely be difficult to implement as well, and it would likely be very difficult to get it looking right for smaller screens as well.

    Best regards,
    Rikard

    #1203217

    First: You mean that Masonry for Posts/Portfolio etc. ?- because a masonry (image) gallery has no sortoptions to preselect in the alb element.

    Due to the changing height of the Masonry container this is very inconvenient. A sorting element placed above keeps its position whether it is followed by 30 Masonry elements or only 4.

    See Examplepage here: https://webers-testseite.de/portfolio/

    Because these two containers are siblings you can change their position by ( via child-theme functions.php ) :
    ( adjust to your page ID )

    function change_position() { 
    if(is_page(2623)){
    ?>
    <script>
    (function($){
    	$('.av-masonry-container').insertBefore($('.av-masonry-sort'));
    })(jQuery);
    </script>
    <?php
    }
    }
    add_action('wp_footer', 'change_position');

    this f.e. in quick css

    .page-id-2623 .av-masonry-sort {
        position: relative;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        display: inline-block;
        margin-bottom: 60px !important;
    }
    #1203424

    Ok no worries – I’m mainly looking for a way to recreate this photographer’s print shop https://luketscharke.com/product-category/gallery/award-winning/
    for my own print shop at https://stevenduncanart.com/my-shop/

    At the moment – in this case – I am using the Masonry gallery listing my products for sale, I like the way the gallery sorts the different tags, but Id like to add more tags, hence the reason why i want to mimic the gallery on the other site.

    What I may have to end up doing is create a different page for each tag and link them all using a menu located down the side.

    #1203515

    on your page : https://stevenduncanart.com/fine-art-prints-shop/?v=6cc98ba2045f#
    please try in quick css:
    (if it is only for that masonry – better give a custom class to the masonry f.e.: sort-left )

    #top div.container .av-masonry.sort-left .av-masonry-sort {
      width: 18%;
      float: left;
    }
    .av-masonry.sort-left .av-masonry-container {
      width: 80%;
      float: left;
      clear: none;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term {
      float: none !important;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term a {
        display: block;
        text-align: left;
        float: none !important;
        clear: both;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term .text-sep {
        display: none;
    }
    #1203518

    Oh that is brilliant! Thanks so much!

    #1203519

    if the titles are a bit too long – maybe a different styling could be better.

    #top div.container .av-masonry.sort-left .av-masonry-sort {
      width: 18%;
      float: left;
      overflow: visible;
    }
    
    .av-masonry.sort-left .av-masonry-container {
      width: 80%;
      float: left;
      clear: none;
      margin-top: 50px;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term {
      float: none !important;
      padding-top: 40px !important;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term a {
        display: block;
        text-align: left;
        float: none !important;
        clear: both;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term .text-sep {
        display: none;
    }
    
    #top .av-masonry.sort-left .av-current-sort-title {
    	text-align: left
    }
    #1203521

    Yes I was just thinking that, the two word titles still take up two lines though but I can always adjust the length or the width of the menu bar thanks to your css. Thanks a bunch!

    #1203523
    #top div.container .av-masonry.sort-left .av-masonry-sort {
      width: 18%;
      float: left;
      overflow: visible;
      margin: 5px !important;
    }
    
    .av-masonry.sort-left .av-masonry-container {
      width: 80%;
      float: left;
      clear: none;
      margin-top: 50px;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term {
      float: none !important;
      padding-top: 40px !important;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term a {
        display: block;
        text-align: left;
        float: none !important;
        clear: both;
    }
    
    #top .av-masonry.sort-left .av-sort-by-term .text-sep {
        display: none;
    }
    
    #top .av-masonry.sort-left .av-current-sort-title {
    	text-align: left;
    	white-space: nowrap
    }
    #1203524

    you had to find a solution for small screens on that – maybe you put the whole code only for a min width:

    @media only screen and (min-width: 768px) {
      …
    }
    #1203525

    Ah, good point, thanks for that!
    It would be absolutely perfect if I were able to organise the sorting options now in the menu, like add sub links or add spaces inbetween a group of selections – but I understand that’s probably not in the scope of the widget :)

    Thanks for your help!

    #1203526

    each button got his unique class as f.e. : landscape_sort_button etc. pp
    so you can select them very specific to insert f.e. a top-border – but a hierarchical structure would be hard to get here
    _________

    by the way, I would recommend you not to use any merging or caching tools while you are working on the styling.
    You don’t always see immediately if something is effective – besides that it’s hard to give the right hints even as an advisor.

    #1203530

    Oh neat, that will probably come in handy, thankyou :)

    You’ve been most helpful! This has saved me a bunch of time building whole pages based on tags, so this is great :D

    #1203599

    Hi duncast,

    Glad you got it working for you with Guenni007’s help! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1300579

    Hi guys, is there a way to sort by mouseover instead on click? I found it in the masonry shortcodes! Thanks!!

    #1300897

    Hi Rafíyel,

    That is not possible unfortunately.

    Best regards,
    Rikard

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.