Php 如何为Wordpress子主题中的图像提供正确的路径
如何在我的wordpress子主题索引页面中提供样式背景图像路径。我试过了,但没用。我在这里给出了我的代码Php 如何为Wordpress子主题中的图像提供正确的路径,php,wordpress,Php,Wordpress,如何在我的wordpress子主题索引页面中提供样式背景图像路径。我试过了,但没用。我在这里给出了我的代码 <div class="item" style="background: url('<?php echo get_stylesheet_directory_uri(); ?>/images/about-banner.jpg')"> 使用下面的代码。 在view source中,您将获得什么路径? use below code. <div class="i
<div class="item" style="background: url('<?php echo
get_stylesheet_directory_uri(); ?>/images/about-banner.jpg')">
使用下面的代码。
在view source中,您将获得什么路径?
use below code.
<div class="item" style="background: url('<?php echo
get_template_directory_uri(); ?>/images/about-banner.jpg')">