Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1126677

    Hello everyone
    I have created a new page:
    Then I created 2 galleries. (Masonry Galerie)
    all images are sorted correctly:
    Then I added a picture to each gallery.
    these pictures then appear at the end of the galleries

    can sort these galleries (Masonry Galerie) per css?

    Thank you in advance
    friendly greetings
    Franz

    #1127154

    Hey schweg33,

    Those images cannot be sorted by css, you can rearrange images while adding or editing the masonry gallery or sorted randomly if certain code is added.

    Best regards,
    Victoria

    #1127199

    Hello Victora
    Many thanks
    I have now found something on the Internet and added this function to the Child Theme.
    Then the added image will be automatically sorted
    that stays with an update?

    But then there is another important question
    When I search for a title of an image, nothing is found.
    what can I do?

    thank you and best regards
    Franz

    #1127338

    Hi Franz,

    The title snippet will work for masonry with posts not just a masonry with images, unfortunately.

    Best regards,
    Victoria

    #1127342

    Hello Viktoria
    :-) but it works without any problems.
    already made 4 tests.

    you have also seen my 2 question:
    When I search for a title of an image, nothing is found.
    what can I do?

    Thank you and nice greetings Franz

    #1127371

    Hi schweg33,

    Where do you search for the image title?

    Best regards,
    Victoria

    #1127377

    in the normal search with the magnifying glass

    https://wuensche.li/?s=hubert

    best regards Franz

    #1128916

    Hi,

    Thank you for the update.

    You can use the following snippet to add the “attachment” post type to the search.

    function attachment_search( $query ) {
        if ( $query->is_search ) {
           $query->set( 'post_type', array( 'post', 'attachment', 'product', 'portfolio' ) );
           $query->set( 'post_status', array( 'publish', 'inherit' ) );
        }
    
       return $query;
    }
    
    add_filter( 'pre_get_posts', 'attachment_search' )
    

    Best regards,
    Ismael

    #1128997

    Thank you very much Ismael
    Then you can close this request

    Beautiful greetings
    Franz

    #1129033

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Masonry Galerie sort by CSS’ is closed to new replies.