Theme trying to load some assets from multisite main site url

We have a Multisite set up and one of the sites has its own theme. However the design is not working, this is because some of the CSS files are not being called.

On investigation it seems that some css/js files are loading from the site url, but some are trying to load from the url of the Multisite admin/main site, which is proxied and behind a firewall, thus not available externally.

Any idea how I can get all the theme assetts to load from the same url? Why would they be loading from two different urls?

Example code below.

<link rel="pingback" href="http://external-dev.llgc.org.uk/xmlrpc.php" />
<link rel='stylesheet' id='theme-bootstrap-css'  href='//internal.mysite.org.uk/external/wp-content/themes/mytheme/bootstrap.min.css?ver=1.0.159' type='text/css' media='all' />
<link rel='stylesheet' id='theme-style-css'  href='//internal.mysite.org.uk/external/wp-content/themes/mytheme/style.min.css?ver=1.0.159' type='text/css' media='all' />
<script type='text/javascript' src='http://external-dev.mysite.org.uk/wp-includes/js/jquery/jquery.js?ver=1.12.3'></script>
<script type='text/javascript' src='http://external-dev.mysite.org.uk/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.0'></script>
<script type='text/javascript' src='//internal.mysite.org.uk/external/wp-content/themes/mytheme/bootstrap.min.js?ver=1.0.159'></script>
<script type='text/javascript' src='//internal.mysite.org.uk/external/wp-content/themes/mytheme/script.js?ver=1.0.159'></script>
<link rel='https://api.w.org/' href='http://external-dev.mysite.org.uk/?rest_route=/' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://external-dev.mysite.org.uk/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://external-dev.mysite.org.uk/wp-includes/wlwmanifest.xml" />
<script>window.wpJQuery = window.jQuery;</script><link rel="alternate" href="http://external-dev.mysite.org.uk/?lang=en" hreflang="en" />
<link rel="alternate" href="http://external-dev.mysite.org.uk/" hreflang="cy" />
  • Adam Czajczyk
    • Support Gorilla

    Hello Paul,

    I hope you're well today and thank you for your question!

    The Multisite WordPress install doesn't store assets separately for each (sub)site. Plugins and themes are all kept in the same "central" location and are being fetched from there for each of the sites of the network.

    That usually is not an issue but in case of your site it may indeed cause troubles. The questions though is how these files in question are called by the theme. This may require editing the theme itself and changing the way these scripts are being called. This article provides in depth view on how scripts and style files should be used in WP themes:

    https://premium.wpmudev.org/blog/adding-scripts-and-styles-wordpress-enqueueing/

    Would that help? Let me know if you need further assistance, please.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.