1

我需要用我创建path的新路径替换下面的图标。child theme

当前路径是:

<img width="32" height="32" src="<?php echo GDLR_PATH . '/images/' . $type . '/social-icon/' . $social_slug . '.png'; ?>" alt="<?php echo $social_name; ?>" />​

这是full path的图标child theme

/the-child-theme​/images​/light​/social-icon/(icon.png​)

请问我有什么帮助吗?

先感谢您

4

1 回答 1

0

您是说需要为移动图像的子主题提供动态路径吗?

如果是,那么您可以使用此功能:get_stylesheet_directory_uri()

它将为您提供通往孩子主题的路径。

例子 :

img src="'.get_stylesheet_directory_uri().'/images/light/social-icon/icon.png"

于 2018-08-24T06:30:30.060 回答