Changing the default url/file path for wp_enqueue
-
Hi,
We’re running a WordPress Network and want to change the default path that get’s prepended when wp_enqueue_style or wp_enqueue_script script are used. How can we change this?For some of our own scripts, we can simple add the full address, but for the plugins we use, we want them all to load from the same location for cashing reasons.
So currently we’d use i.e.
wp_enqueue_script('sn-default', get_bloginfo('template_url').'/js/default.js', 'jquery');
which results in:https://www.dynamicdomainname.com/wp-content/themes/Boutique/js/default.js?ver=3.2.1
But we want it to be:
https://www.staticdomainname.com/wp-content/themes/Boutique/js/default.js?ver=3.2.1
How can we set this default?
- The topic ‘Changing the default url/file path for wp_enqueue’ is closed to new replies.