I'm running the latest version of WordPress 4.4.1, and I'm having a very frustrating issue. I run a multisite installation, and use Advanced Custom Fields throughout the site to allow the imagery to be content manageable through the admin panel.
On every site, except the primary site, imagery isn't working if not hardcoded. For example, on each page I allow the user to upload a banner which will show at the top of each page.
For example, if they're on site #2, when they upload imagery it's placed into:
However, whatever method I use to try and display these images in the templates, it always gets the URL wrong, excluding the
I first thought this was an issue with the plugin Advanced Custom Fields, and the way it was trying to output the URLs. I've ruled this out now, as I setup Advanced Custom Fields to pass out an attachment URL, and then I used
wp_get_attachment_image_src to convert the attachment ID into a URL. This also doesn't work, so now I'm really stuck!
Here's the multisite part in my
/* Multisite */ define('WP_ALLOW_MULTISITE', true); define('SUNRISE', 'on'); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
I've tried commenting out the last three lines there, thinking it might just be confusing WordPress into thinking every site on the network was the first, primary site. This didn't help.