0

I want to get the theme root URL with PHP. What would be the best way to do that?

There is a function called get_theme_root() which gives me the path but not the URL.

Maybe just get the current themes or parent themes URL and cut the theme directory off? How do I do that?

1

I think you just want get_theme_root_uri(). Note that it doesn't contain the trailing slash.

  • lol there is a function for that. well i just was ready with echo dirname ( dirname( get_stylesheet_uri() ) ); ;/ – amy Apr 28 '12 at 21:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.