Randomizing Photo Gallery Support Forums for LiveMesh Themes & Plugins › Forums › Invent Theme Support › Randomizing Photo GalleryThis topic has 13 replies, 2 voices, and was last updated 6 years, 6 months ago by Veena. Viewing 14 posts - 1 through 14 (of 14 total) Author Posts January 5, 2015 at 9:18 pm #11488 tsubasa_gakiMember Is it possible to have photos to be shown randomly when using photo galleries? If so, how? Thank you. January 6, 2015 at 2:11 pm #11498 VeenaModerator Pls modify the file gallery-functions.php(framework/functions/gallery-functions.php) line no:13 as below – $query_args = array('post_type' => 'gallery_item', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'],'orderby' => 'rand', 'paged' => $paged); January 6, 2015 at 10:43 pm #11513 tsubasa_gakiMember Hi! I’ve modified the code as above but there were no changes. Here’s the link to the website I’m working on http://naitsa.ca/topmodel/. Should I change or add anything else? Thanks. January 7, 2015 at 1:22 pm #11537 VeenaModerator Can you pls mention which shortcode is using there to display gallery items? The above mentioned changes will work on gallery page.For shortcodes we need to make changes in a different file. January 7, 2015 at 4:25 pm #11541 tsubasa_gakiMember This is the code I’m using on the page section: [show_gallery number_of_columns=”4″ post_count=”12″ image_size=”medium” filterable=”false” no_margin=”true”] January 8, 2015 at 2:07 pm #11559 VeenaModerator Pls modify file gallery-functions.php(framework/functions/gallery-functions.php) line no:143 as below – $loop = new WP_Query(array('post_type' => 'gallery_item', 'posts_per_page' => $posts_per_page, 'orderby' => 'rand')); January 8, 2015 at 3:58 pm #11562 tsubasa_gakiMember Still not working. Is there anything I can do? I have also noticed the gallery isn’t opening as lightbox, just linking to the images. Can we fix that too? Thank you. This reply was modified 6 years, 6 months ago by tsubasa_gaki. January 9, 2015 at 7:28 am #11567 VeenaModerator It should work, before i have tested the code in my installation. Kindly share FTP login credentials, We will check once. January 19, 2015 at 3:49 pm #11824 tsubasa_gakiMember This reply has been marked as private. January 20, 2015 at 3:22 pm #11838 VeenaModerator This reply has been marked as private. January 20, 2015 at 9:29 pm #11852 tsubasa_gakiMember This reply has been marked as private. January 21, 2015 at 6:54 am #11862 VeenaModerator Strange, On checking your code is perfect but i failed to understand why it is so. Could you pls share a temporary login to your site as a private reply ? January 21, 2015 at 3:35 pm #11876 tsubasa_gakiMember This reply has been marked as private. January 22, 2015 at 5:26 pm #11910 VeenaModerator In your Wp Engine site they have disabled Rand function , now we have enabled the same in Wp Engine Advanced Configuration and everything is working fine now. You can take a look in this link- https://wordpress.org/support/topic/wp_query-orderby-random-not-working Also we have unchecked “DISABLE HOVER ON GALLERY” option in themeoptions > Gallerypage for lightbox to work. Author Posts Viewing 14 posts - 1 through 14 (of 14 total) The topic ‘Randomizing Photo Gallery’ is closed to new replies.