-2
我想從我的HTML/CSS模板1日重新編碼到WordPress的,但我不記得如何插入在PHP如何在Wordpress中將圖像插入到模板中?
圖像。例如HTML:
<img src="img/imageOne.jpg">
和PHP?
我想從我的HTML/CSS模板1日重新編碼到WordPress的,但我不記得如何插入在PHP如何在Wordpress中將圖像插入到模板中?
圖像。例如HTML:
<img src="img/imageOne.jpg">
和PHP?
你有這樣的用戶WordPress的功能,
<img src="<?php echo get_template_directory_uri(); ?>/img/imageOne.jpg">
檢查get_template_directory_uri()更多的參考。
圖像添加在WordPress模板
<img src="<?php echo esc_url(get_template_directory_uri()); ?>/img/imageOne.jpg"/>
@ROCKY:如果你有答案,請做upvote。謝謝..!! – Virb