I have WordPress 4.4 installed localy on wamp server 2.5 x64 on Windows 10 and noticed that:
get_template_directory();
returns this:
'C:\wamp\www\my-site//content/themes/my-theme'
Questions
- What’s the reason for those two sequential slashes, if this is not a bug?
- Why WordPress does not handle DS correctly (regarding slashes and backslashes)? is this something up to the web server or the script itself?
1 Answer
It is a bug the get_template_directory();
should not return a string that looks like that, try making another installation of WordPress, and echo the get_template_directory();
and see if the output is the same, if it is not then there is something wrong with the first installation.