I'm creating a wordpress theme. and i want some of the images to remain static. how can i get the url behind my image source.
My Default Image URL <img src="assets/logo/logo.jpg">
I was trying <img src="../assets/logo/logo.jpg">
Is there any function of wordpress that we can use to get the url of an image?
你需要获得主题文件夹的完整路径,你可以像这样做
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/logo/logo.jpg">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.