Site_url() is giving me differnt values depending on where I use it
-
So. When I just
<?php echo site_url(); ?>
I get the correct value. In this case it’s https://54.172.177.23/sp/ (if you go to the site, you can see it printed at the top.) When I do the same thing to link to a video in a folder in my theme’s root, I only get https://54.172.177.23/WHY!?
My site is installed on Amazon AWS with other staging sites using a free tier micro instance, that’s why my
site_url()
includes a sub directory.I’ve tried
get_template_directory_uri()
and all the other ways I can think of to get this to work but they all do the same thing. Echoing out the correct URL when used alone, and when I try to use it to link to the video, it just drops the /sp/I am pulling the site url dynamically in the site plenty of other places with no issues. Why here, why now?
- The topic ‘Site_url() is giving me differnt values depending on where I use it’ is closed to new replies.