Gallery Shortcode Pulling ALL images in do_shortcode
-
I have a site that has used this code for well over a year and displayed just the current post’s worth of images in a custom-post-type-single.php template.
<?php echo do_shortcode( '[gallery columns="3" size="listing-gallery-thumb" link="file"]'); ?>I updated to WP 3.6 and then to 3.6.1 within a couple of days of each release, and today the client came to me and these galleries were displaying ALL images from all posts.
I added a post id to the code like so
?php echo do_shortcode( '[gallery columns="3" size="listing-gallery-thumb" link="file" id='. $post->ID . ']'); ?>And that fixed the error, but all of the documentation i can find still says thet the default behavior without the post ID should be to show only the current post’s images.
Has this changed with 3.6 or 3.6.1?
The topic ‘Gallery Shortcode Pulling ALL images in do_shortcode’ is closed to new replies.