View Categories

How To Exclude WPVR From Autoptimize

Table of Contents

If you are using Autoptomize for your site, then you will need to exclude WPVR from Autoptimize.

Step 1 #

Go to Autoptimize and under JavaScript Settings turn off the option:
Also aggregate inline JS‘.

JS options - Autoptimize

Then check if your tour is loading.

If this does not work or if you need the feature of Autoptimize for your site, then move on to Step 2.

Step 2 #

Go to Autoptimize and under JavaScript Settings, find the ‘Exclude scripts from Autoptimize‘ field.

JS options exclude - Autoptimize

Here, copy and paste the following:

wp-content/plugins/wpvr/public/lib/pannellum/src/js/pannellum.js?ver=1, wp-content/plugins/wpvr/public/lib/pannellum/src/js/libpannellum.js?ver=1, wp-content/plugins/wpvr/public/js/video.js?ver=1, wp-content/plugins/wpvr/public/lib/pannellum/src/js/videojs-pannellum-plugin.js?ver=1, wp-content/plugins/wpvr/public/js/owl.carousel.js?ver=5.2.4, wp-content/plugins/wpvr/public/js/wpvr-public.js?ver=1.0.0

Next, go to Autoptimize and under CSS Settings, find the ‘Exclude CSS from Autoptimize‘ field.

CSS options exclude - Autoptimize

Here, copy and paste the following:

https://use.fontawesome.com/releases/v5.7.2/css/all.css?ver=1.0.0, wp-content/plugins/wpvr/public/lib/pannellum/src/css/pannellum.css?ver=1, wp-content/plugins/wpvr/public/lib/pannellum/src/css/video-js.css?ver=1, wp-content/plugins/wpvr/public/css/owl.carousel.css?ver=1.0.0, wp-content/plugins/wpvr/public/css/wpvr-public.css?ver=1.0.0

Save.

Now check. Your WPVR tours should work just fine.