Thanks Jordy
Some feedback on the Randomize Gallery code:
I uncommented these 2 lines:
if ( !isset( $atts['random'] ) || $atts['random'] !== 'true' )
return false;
Adding a gallery with this shortcode:
[gallery ids="" layout="justified" random="true"]
only lists the first 5 images that I uploaded to the media library.
Changing the LIMIT to say 8, lists the first 8 images that were posted to the library.
No randomization.
Also my galleries from Lightroom using WP/LR Sync with for example this shortcode:
[gallery layout="masonry" wplr-collection="2"]
reports the MEOW gallery empty when the 2 lines of code above are uncommented.
However if I include random=”true”:
[gallery layout="masonry" random="true" wplr-collection="2"]
The gallery displays all images in that collection.
But all other WPLR collections report gallery empty – so they must all contain the random attribute.
“ORDER BY 1” means sorting on the first column in the table which is the post ID.
I removed that in your code, and the script selects another 5 images (always the same 5 images) so not random.
Quite a bit of troubleshooting to keep track of! ??
BTW I tried to update the latest version of the plugin v3.5.5 now and got an error message:
“Update Failed: Download failed. Unauthorized”
Cheers
Dave