Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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.

    #705175

    Hey 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,
    Rikard

    #709888

    Hello 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.

    #710123

    Hey!

    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!
    Ismael

    #710483

    Hello 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.
    #711183

    Hi,

    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,
    Andy

    #711190

    Hi!

    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!
    Ismael

    #712106

    Hello Ismael,

    SFTP info is below.

    #712722

    Hi,

    I found out that this is a wpengine issue. Please check this thread.

    // https://wordpress.org/support/topic/my-cpt-all-migrated-but-theyre-in-a-different-order-on-the-front-end/?replies=3

    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,
    Ismael

    #712976

    That’s great. Thank you so much. Of course it was something simple…

    Thanks again for a great theme and great support.

    #713370

    Hi,

    It usually is, glad we could help though :-)

    Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.