Skip to main content
6 of 6
added 98 characters in body
Tom J Nowell
  • 61.6k
  • 7
  • 81
  • 150

get_stylesheet_directory_uri is what you want. it returns the URL of the current theme. get_stylesheet_directory will return the file path on the server.

For example:

<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/image.png" /> 

If you need the parent theme, get_template_directory and get_template_directory_uri are the equivalents.

If there is no parent theme then both will return the same value.

Further reading:

Tom J Nowell
  • 61.6k
  • 7
  • 81
  • 150