theme development – get main URL from subdirectory with php
I have a WordPress site that contains multiple subdirectory installations of WordPress with individual databases inside one WordPress installation, and I want to link them together in the themes. But I couldn’t figure out how to dynamically get the main URL from the base WordPress directory for one of the subdirectories.
For example, I tried to use get_home_url() but it only returns https://mytestsite.com/instance1 instead of https://mytestsite.com
This might be something basic but i couldn’t find anything in my resarch that could help me out.
Leave an answer