質問編集履歴

1

例の画像パスのエスケープ範囲に誤りがあったため修正いたしました。

2022/05/03 06:26

投稿

cryson
cryson

スコア22

test CHANGED
File without changes
test CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  しかし、例えば画像ソースを出力するための
7
7
  ```PHP
8
- <img src="<?php echo esc_url(get_template_directory_uri()); ?>/hoge.jpg">
8
+ <img src="<?php echo esc_url(get_template_directory_uri() . '/hoge.jpg'); ?>">
9
9
  ```
10
10
  や、内部アンカーリンクに
11
11
  ```PHP