Tagged: portfolio grid, post order, random, sort order
-
AuthorPosts
-
October 27, 2016 at 5:43 pm #704945
Hello team Kriesi!
I am having some issues with the random feature on a portfolio gallery. The gallery is set to load randomly, but it loads in the same order every time.
Here is the page it is happening on – http://wainhouse.wpengine.com/ (hosted on WPengine)
Any idea what would be causing this or how I can fix it? Thanks in advance for the help.
October 28, 2016 at 7:47 am #705175Hey Raymmar,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardNovember 8, 2016 at 4:40 pm #709888Hello Rikard, I never saw this reply. I have posted the information below for you to take a look. Please let me know if you need anything else.
November 9, 2016 at 9:32 am #710123Hey!
I’m sorry but I’m not sure why the “orderby” option is not working. I tried to filter the query in the functions.php file but no dice. Did you modify any of the theme files or did you filter the query? This is the code in the functions.php file:
//portfolio query add_filter( 'avia_post_grid_query', 'avia_post_grid_query_mod', 10, 2); function avia_post_grid_query_mod( $query, $params ) { $query['orderby'] = 'rand'; return $query; }
Cheers!
IsmaelNovember 9, 2016 at 11:48 pm #710483Hello Ismael,
I have not made any modifications to the theme files or filtering query’s. This is a pretty stock instal of the Enfold theme with almost no plugins installed. How can we resolve this?
- This reply was modified 8 years, 1 month ago by Raymmar.
November 11, 2016 at 3:33 pm #711183Hi,
There might be some corrupted files, so please delete all theme files completely via FTP, before installing a fresh copy from your themeforest account. Here is a short tutorial on how to install the theme via FTP, in case you are not sure how that works:
Best regards,
AndyNovember 11, 2016 at 3:41 pm #711190Hi!
I tested the settings on my own installation and it’s working. Please post the FTP details here so that we can inspect the issue carefully.
Cheers!
IsmaelNovember 14, 2016 at 5:57 pm #712106Hello Ismael,
SFTP info is below.
November 16, 2016 at 4:03 am #712722Hi,
I found out that this is a wpengine issue. Please check this thread.
Normally we disable ORDER BY RAND() orderings in MySQL queries because this is a big no-no for large databases which we’ve seen cause massive slow-downs for dozens of our customers. However, you can enable it if you know what you’re doing, for example if you cache the results for 5-15 minutes so that you’re not pummeling the database with these slow queries.
I enabled the Allow ORDER BY RAND() option in the WP Engine’s dashboard and it’s working now.
Best regards,
IsmaelNovember 16, 2016 at 4:11 pm #712976That’s great. Thank you so much. Of course it was something simple…
Thanks again for a great theme and great support.
November 17, 2016 at 6:06 am #713370 -
AuthorPosts
- You must be logged in to reply to this topic.