@itwork46 You can only get a gallery from a single post ID. At this time, the plugin is not capable of fetching and merging multiple galleries in a single instance.
Thank you, very sorry to hear that, then I will have to look for other solutions.
Okay, I found a solution.
This is the code I use in the repeater template
<?php
global $post;
$thumb_size_small = wp_get_attachment_image_src( $post->ID, 'single-coloring-thumb', true );
$thumb_url = get_permalink( $post->ID );
?>
<div class="itemlist-block hover-style-2 fancybox" data-fancybox data-type="ajax" data-link="<?php echo $thumb_url; ?>">
<div class="itemlist-block__top">
<img src="<?php echo $thumb_size_small['0']; ?>">
</div>
<div class="itemlist-block__bottom d-block ta-center fz-14 fz-sm-15 fz-xxl-16 lh-1-3">
<span><?php echo $post->post_excerpt; ?></span>
</div>
</div>
This is a finished shortcode. It allows me to show all the images from all the galleries of the posts I want.
[ajax_load_more post_type="attachment" posts_per_page="24" post_status="inherit" post__in="' . $gallery_child_ids . '" post__not_in="' . $thumb__not_in . '" transition_container_classes="row row-cols-2 row-cols-md-4 g-3 g-lg-4 mt-0 itemlist" pause="true" scroll="false" preloaded="true"]
I just get all the images that exist in the media post_type="attachment", of which I leave only those that exist in the galleries of the posts I want, and leave only the unique ones (which are not on the current page).
Here I leave all the images from all the galleries from the different posts.
post__in="' . $gallery_child_ids . '"
Here I remove all images that exist in the gallery of the current post (so there are no duplicates)
post__not_in="' . $thumb__not_in . '"
-
This reply was modified 3 years, 2 months ago by
itwork46.
However, I ran into the problem of large HTML code, which is bad. So if an update comes out that allows you to get and display a gallery from different posts, that would be cool.
https://prnt.sc/gFwH6IMDcRvw