root-relative links for multiple parked domains
I tracked the function calls in my theme (a child theme of Oenology by Chip Bennett) and wp-include that generate the links, found the home_url() function, and then wrote these functions for my site: function gregory_make_relative($url=””) { return preg_replace( ‘#^https?://[^/]+/#iu’, “https://wordpress.stackexchange.com/”, $url, 1 ); } add_filter( ‘home_url’, ‘gregory_make_relative’, 11, 1 ); I intentionally grep-searched to … Read more