- This topic has 7 replies, 3 voices, and was last updated 4 months, 4 weeks ago by
Tom.
-
AuthorPosts
-
October 8, 2020 at 9:11 pm #1479543
Ryan
Hey guys, after updating to the new version, my quiz plugin (WP-Quiz) stopped working. If I change back to my old theme, the plugin works again. Was wondering if you could help me with this
Here is an example (if you click on a quiz answer, it won’t move on to the next question)
https://www.thronesquiz.com/who-would-be-your-best-friend-in-game-of-thrones/
October 8, 2020 at 10:52 pm #1479625Tom
Lead DeveloperLead DeveloperHi there,
You have a javascript error on the page from a
personality.js
file saying jQuery is not defined.The theme won’t load jQuery unless it requires it, so scripts like the above need to do it if they need.
You can force it to load like this:
add_action( 'wp_enqueue_scripts', function() { wp_enqueue_script( 'jquery' ); } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 9, 2020 at 6:25 am #1480303Ryan
Hey Tom, where do I add that code?
I tried to add it using the ‘Code Snippets’plugin but it did not work.
October 9, 2020 at 10:04 am #1480800Leo
StaffCustomer SupportHmm that code should work in Code Snippets.
Did you clear all of your caching plugins or server cache after adding it?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 9, 2020 at 10:17 am #1480827Ryan
Hey Leo,
Yes, I have purged my caching plugins and have also done so on Cloudflare. Still no luck unfortunately.
October 9, 2020 at 10:27 am #1480846Tom
Lead DeveloperLead DeveloperCan you temporarily disable your caching? The fact that it’s still saying jQuery is not defined means the function isn’t working on your site. That means your site is likely cached.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 9, 2020 at 10:48 am #1480885Ryan
Hey Tom,
It turns out that it was a conflict between GP and Autoptimize.
For anybody else who has the problem in the future, I unchecked the ‘Aggregate JS-files?’ button on the plugin and it now works perfectly.
Thanks for the help guys.
October 9, 2020 at 10:49 am #1480887Tom
Lead DeveloperLead DeveloperThis likely is a conflict between Autoptimize and the Quiz plugin, as GP doesn’t depend on jQuery for anything.
Glad you got it sorted! 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.