回答編集履歴

1

phpタグを追記

2015/05/08 08:39

投稿

ucan-lab
ucan-lab

スコア888

test CHANGED
@@ -28,6 +28,8 @@
28
28
 
29
29
  ```lang-php
30
30
 
31
+ <?php
32
+
31
33
  // ショートコードを使わない場合
32
34
 
33
35
  // echo get_post_meta(get_the_ID(), 'custom_field_name', true);
@@ -35,6 +37,8 @@
35
37
  // ショートコードを使う場合
36
38
 
37
39
  echo apply_filters('the_content', get_post_meta(get_the_ID(), 'custom_field_name', true));
40
+
41
+ ?>
38
42
 
39
43
  ```
40
44
 
@@ -51,6 +55,8 @@
51
55
 
52
56
 
53
57
  ```lang-php
58
+
59
+ <?php
54
60
 
55
61
  /*
56
62
 
@@ -82,6 +88,8 @@
82
88
 
83
89
  add_shortcode('theme_child_url','getStylesheetDirectoryUri');
84
90
 
91
+ ?>
92
+
85
93
  ```
86
94
 
87
95