• Resolved ttanemori

    (@ttanemori)


    Thank you very much for making a nice plugin.

    Tis is the 2nd day after I began to use it. I realized that random order of questions is not working. Random order of questions is working OK.

    I disabled/enabled the plug in, but it did not help. I created a test quiz to isolate the issue, but it also shows the same problem.

    I refeshed the page many times. I also tried different browsers and inPrivte mode. My website does not have caching plug in as far as I know.

    Could you advise me how to fix it?

    This is my current setting.

    https://www.dropbox.com/s/scikj14nmh72vkh/14.PNG?dl=0

    I have 14 questions, and want to show 10 of them randomly.

    Thank you.

    • This topic was modified 3 years, 12 months ago by ttanemori.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Hmmm.. this is interesting.

    I can only think of two possibilities that could cause this.

    1) Correct Quiz on Page?

    Just to make sure, are you 100% sure that the quiz on the page is the same quiz where you set it to randomized?

    2) Something else on your site is affecting how WordPress Queries work.

    The thing is that if this were the case, then the randomize answer order would still work. But on your site, neither the question or answer order is changing.

    Since your site is using Chinese characters, the issue might be that your installed version of WordPress or even PHP uses a different word or terminology for rand – but I’m just guessing at this point.

    Please try the following.

    1. Switch theme to the default Twenty Twenty theme. If it now works, then we know that the issue lies with your theme.
    2. If it is not your theme, then we need to test plugins. Deactivate all plugins except HD Quiz then test again. Then re-enable each plugin one by one until we find the culprit.

    If that also fails, then the only other things I can think of would require a bit of work on your end.

    The first is to edit HD Quiz directly and hardcode the random settings in.
    Edit ./hd-quiz/includes/template.php and change line 150 to
    'orderby' => "rand", // defaults to menu_order

    If this works then we know that the issue was something to do with your site being unable to retrieve the quiz setting for randomizing order.

    If even hardcoding doesn’t work, then the only thing left to try is to enable error reporting. This will help us know if there is some fatal error on your site that is blocking HD Quiz from running default WordPress queries.

    To enable “debug mode” you need to edit wp-config.php found in the main installation folder of WordPress (usually the public_html folder). From there, find the line define('WP_DEBUG', false); and set it to true define('WP_DEBUG', true);. If there is no WP_DEBUG line, then you can add it above the comment /* That's all, stop editing! Happy blogging. */

    Please keep me in the loop on anything you uncover as this is a super weird issue that has never come up before – so I’d love to be able to help you figure out the cause of this.

    Thread Starter ttanemori

    (@ttanemori)

    Thank you very much for your reply.

    Finally, I found that “Post Types Order” plug-in was the cause of the problem.

    https://wordpress.org/plugins/post-types-order/

    After I disabled it, the random order feature began to work.

    I have already reported it to the developer of Post Types Order. Unless they can update it, I may have to find something else to arrange the order of my posts.

    Thank you very much for your support.

    Plugin Author Harmonic Design

    (@harmonic_design)

    Interesting; looks like that plugin forces all queries to use the menu order. It looks like it has an “AutoSort” feature that overwrites all queries to use the menu order. See if there is a way to turn that feature off for certain pages or queries.

    One plugin I can vouch for that works well is Intuitive Custom Post Order so you can give that a try

    Thread Starter ttanemori

    (@ttanemori)

    Thank you so much for recommending the alternative post order plug in. HD Quiz and Intuitive Custom Post Order plug-ins work perfectly together!

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Random Order does not work’ is closed to new replies.