[英]Child theme wordpress icon path
我需要更換以下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; ?>" />
這是child theme
圖標的full path
:
/the-child-theme/images/light/social-icon/(icon.png)
請問我有什么幫助嗎?
先感謝您
您是說您需要為移動圖像的子主題提供動態路徑嗎?
如果是,那么你可以使用這個函數:get_stylesheet_directory_uri()
它將為您提供通往孩子主題的路徑。
例子 :
img src="'.get_stylesheet_directory_uri().'/images/light/social-icon/icon.png"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.