-
AuthorPosts
-
August 11, 2019 at 11:28 pm #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 galleriescan sort these galleries (Masonry Galerie) per css?
Thank you in advance
friendly greetings
FranzAugust 13, 2019 at 11:42 am #1127154Hey 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,
VictoriaAugust 13, 2019 at 1:33 pm #1127199Hello 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
FranzAugust 13, 2019 at 6:19 pm #1127338Hi Franz,
The title snippet will work for masonry with posts not just a masonry with images, unfortunately.
Best regards,
VictoriaAugust 13, 2019 at 6:25 pm #1127342Hello 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
August 13, 2019 at 7:15 pm #1127371Hi schweg33,
Where do you search for the image title?
Best regards,
VictoriaAugust 13, 2019 at 7:22 pm #1127377August 19, 2019 at 2:53 pm #1128916Hi,
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,
IsmaelAugust 19, 2019 at 7:22 pm #1128997Thank you very much Ismael
Then you can close this requestBeautiful greetings
FranzAugust 19, 2019 at 10:36 pm #1129033Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Masonry Galerie sort by CSS’ is closed to new replies.