Answer the question
In order to leave comments, you need to log in
How to set image path in wordpress?
Good afternoon, maybe someone has come across this. While the wordpress site was on a PC, everything worked fine, the template contained lines like:
<img src="<?php echo get_template_directory_uri() ?> /img.jpg" width="300">
Answer the question
In order to leave comments, you need to log in
if you have a child theme then use get_stylesheet_directory_uri()
get_template_directory_uri()
Gets the path to the folder template, inside the template you need to explicitly specify in which folder of the picture
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question