WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I imagine this is really simple but I can't work it out. I am trying to add a menu page to the WordPress dashboard through my theme. I have the following...

    plugins_url( 'myplugin/image/icon.png' ), 

Which works, but I want to use an icon in my themes directory instead of plugin. How can I alter this to look in there instead? I have tried using theme_url instead but it's not working.

share|improve this question
up vote 6 down vote accepted

There is not such a function as theme_url, if I am not mistaken.

Take look at get_template_directory_uri or get_stylesheet_directory_uri

share|improve this answer
Thanks, that did it – fightstarr20 Oct 18 '13 at 15:56
@fightstarr20 Then please mark it as solution... – kaiser Oct 18 '13 at 16:00

get_template_directory_uri() should be used to get parent theme directory URI. get_stylesheet_directory_uri() should be used to get child theme directory URI.

share|improve this answer
It's worth noting that get_stylesheet_ will get the parent, if no child exists. – brasofilo Oct 20 '13 at 2:05

Your Answer


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.