If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
But, I have a question related to exactly this topic. I would like the default background gallery to load images in random order. (An options pulldown box for display order when uploading any kind of galleries would be even better!…)
Kriesi submitted a solution if / else statement that would apparently filter only the background gallery to load in random order. But, I don’t know where to try inserting that code into the includes / helper-slideshow.php file!?….
The previous user said he tried editing the line ‘orderby’ => ‘menu_order ID’)); to read ‘orderby’ => ‘rand’))…..
But, this ‘orderby’ line appears at least 2 times through the file.
I am assuming Kriesi meant to substitute the if / else statement for the entire code block:
$attachments = get_children(array(‘post_parent’ => $attachment_holder,
‘post_status’ => ‘inherit’,
‘post_type’ => ‘attachment’,
‘post_mime_type’ => ‘image’,
‘order’ => ‘ASC’,
‘orderby’ => ‘menu_order ID’));
Thanks for reading!
You would need to replace that whole if statement. Lines 149-157. Though I tested it out and it doesn’t seem to work.
I’ll tag Kriesi and Peter on this post and see if they have an additional thought on what it might take to get it to work as I wasn’t able to get it working in my testing.
The topic ‘random background galleries’ is closed to new replies.