Skip Navigation

[Resolved] Not showing all images of post in the gallery – why?

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by peterZ 4 years ago.

Assisted by: Minesh.

Author
Posts
#1551495

Tell us what you are trying to do?
Displaying galleries dynamically with all images that are added to a post.
One specific post (10th street) only displays certain pictures and others not - but they all are in the post.
Is there any documentation that you are following?
I got help from Shane before
Is there a similar example that we can see?

What is the link to your site?
hidden link

#1552011

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please sahre problem URL and access details where you are displaying the gallery and which gallery is not working.

We have one know issue related to gallery images but if you can share the above details that will help to confirm if its a same issue which we know already or different one.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1560155

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please try to follow the instructions given with the following errata page and try to resolve your issue:
=> https://toolset.com/errata/when-using-a-certain-amount-of-images-in-galleries-while-toolset-is-active-the-galleries-might-not-display/

#1567579

Hi there,
this didn't work :/
Thanks,
Peter

#1567857

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now.

I've adjusted the code for the custom shortcode [get_image_ids] as given under which you added to the "Custom Code" section of Toolset:

function get_image_ids( $atts ) {
 global $wpdb;
    // Attributes
    $atts = shortcode_atts(
        array(
            'field' => '',
            'id' => get_the_ID()
        ),
        $atts
    );
      
    $image_urls = get_post_meta($atts['id'],$atts['field']);
   
    $id_list = array();
    foreach ($image_urls as $image_url) {
        if(!empty($image_url)){
                 $attachment = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url )); 
               //  $attachment = attachment_url_to_postid($image_url);
                 array_push($id_list, $attachment);
             }
        }
         
    
 	return implode(",", $id_list);   
}
add_shortcode( 'get_image_ids', 'get_image_ids' );

If you can check now, I can see all the images: hidden link

#1567867

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.