Prevent theme JS from loading at age gate
-
Hi,
thanks for this plugin, it works great and is well documented. Nice work.My theme loads some JS that obviously throws some console errors when several elements on the page are missing, which is the case on the age gate page (i.e. navigation). What condition can I use to prevent the JS from enqueueing at the age gate? I’m looking for something like
if (!is_age_gate) { wp_enqueue_script … }
or
if (!basename($template) !== ‘age_gate.php’) { wp_enqueue_script … }Thanks & Regards!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Prevent theme JS from loading at age gate’ is closed to new replies.