Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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