0

I am using site_url() function and it returns the address as http:\/\/vip.local\/cc where I can see that WP automatically adds unnecessary backslashes. Is this for some escaping purpose? I tried using strpslashes function but that didn't fix it either. Any help?

  • This seems like there may be something wrong with your site (or PHP) configuration – it's definitely not meant to add any slashes. You're not passing it through another function first are you? Have you checked what bloginfo('wpurl') gives you? – William Turrell Apr 21 '15 at 21:41
  • @WilliamTurrell bloginfo('wpurl') returns null – user3312508 Apr 21 '15 at 22:02
  • Have you tried using the default theme and/or disabling any plugins you have installed? It is possible that the theme or a plugin is using the site_url filter to alter the output – czerspalace Apr 21 '15 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.