回答編集履歴
1
追記
answer
CHANGED
@@ -3,4 +3,16 @@
|
|
3
3
|
|
4
4
|
一度コンテンツを文字列として取得してから出力する必要があるなら
|
5
5
|
``echo apply_filters('the_content',get_the_content());``みたいな感じに
|
6
|
-
出力時には[the_content](https://developer.wordpress.org/reference/hooks/the_content/)フィルタを通しましょう
|
6
|
+
出力時には[the_content](https://developer.wordpress.org/reference/hooks/the_content/)フィルタを通しましょう
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
追記
|
11
|
+
|
12
|
+
PHPファイルのコードがそのまま出力されてしまうということであれば
|
13
|
+
シンタックスエラーを探してください
|
14
|
+
|
15
|
+
``""`` ``''`` やヒアドキュメントが閉じられてないとか
|
16
|
+
``<?php``あるいは``?>``が不要に書かれている
|
17
|
+
php7でNGになった``<?``がいるとか
|
18
|
+
この辺りをチェック
|