Return the install directory
-
I am trying to dynamically get my wordpress install directory. For example, if the url of my wordpress installation is https://www.example.com/blog/, I would like to have my script return “/blog/”. I’ve tried bloginfo(‘home’) et al. I’ve also tried this:
`
$search = “https://”.$_SERVER[“HTTP_HOST”];
$replace = “”;
$mix = bloginfo(‘siteurl’);
$newphrase = str_replace(“$search”, “$replace”, $mix);
`No dice.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Return the install directory’ is closed to new replies.