June 19, 2014 at 6:42 pm #110696
Here is the setup:
1. WordPress Network using subdomains xyz.mynetwork.com
2. Subdomains mapped to a unique URL i.e. xyz.com using: WordPress MU Domain Mapping
Here is what I noticed. The featured images URL's on the home page are xyz.mynetwork.com/wp-content/uploads/sites/15/2014/06/logo-300x162.png
But when I view a post or page the image URL's are what I want them to be e.g. XYZ.com/wp-content/uploads/sites/15/2014/06/logo-300x162.png
Why do the child themes do this and is there a way I can have the home page images use the same URL structure as the individual posts e.g. xyz.com instead of xyz.mynetwork.com?
The reason I ask is that I'm also using W3 Total Cache with a CDN and it won't use my CDN because of the domain name mismatch.June 19, 2014 at 7:40 pm #110703
I had this EXACT same problem! OK, not exact. But, featured images with a CDN problem. And I could not find answers anywhere at the time. Anyway, what I discovered (and let me know if this doesn't work for you, because I kept a whole file of notes somewhere about what I did) is in my sites, I had to completely delete the path for the site I was mapping. That is, my path was /oncecoupled/ (see, not exactly the same problem, I didn't use subdomains...) which I edited it and removed, then changed the domain from the original (ie mynetwork.com) to oncecoupled.com (ie xyz.com).
June 19, 2014 at 8:18 pm #110705
Thank you for the response! I'm glad to hear I wasn't the only one. I changed the subdomain from /xyz.mynetwork.com to just "/". Saved it; then, put it back to xyz.mynetwork.com. Unfortunatly that didn't work. What is your understanding of what caused the fix? For example did this trick WP into thinking that this network site was really living at the root i.e. "/"? Worst case scenario I can hack around in the database and force it to mold to your solution.June 19, 2014 at 8:41 pm #110710
Update: I bashed around the database and changed these two values in the "Options" table:
option_name | option_value
siteurl | xyz.com
home | xyz.com
This has fixed it. Now home page URL's are xyz.com instead of xyz.mynetwork.com.
Who says trouble shooting after a drink or two was unproductive. 🙂June 19, 2014 at 8:53 pm #110711
OK, I don't quite recall all of the details. What I do remember is that my images weren't being handled properly by the CDN.
In the end, the discovery that prompted the soluation was seeing that my site was at http://oncecoupled.com, but if I went into my images' edit screen, the URL that would show http://hostdomain.com/oncecoupled/...etc.
By changing the site settings (that is, removing the path and changing the domain) I was able to verify that my changes had been successful by viewing my media again and now seeing the URL was http://oncecoupled.com/wp-content/...etc.
After the URLs were fixed, my CDN was able to grab all the files properly and handle my site with the images.
June 19, 2014 at 8:58 pm #110712
BTW, found the post that originally helped me! It's sub-domain specific, so it should be perfect for you: http://wordpress.org/support/topic/featured-image-paths-in-mapped-subdomains?replies=9#post-3906844
June 19, 2014 at 9:02 pm #110713
Thank you again for the assist Lauren! Your feedback got me thinking about how the theme has to operate. By tweaking the two columns in the "options" table I was able to solve the problem. Now my home page is loading with multiple subdomain CDN glory: http://snakeoilsocial.com/June 19, 2014 at 9:49 pm #110722
Beautiful! I've been waiting for the day when my struggles with this would be helpful! I'm glad you were able to find your solution, even if it wasn't the same solution I was providing. 🙂
- The forum ‘General Discussion’ is closed to new topics and replies.