質問編集履歴
1
ソースコード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,6 +46,102 @@
|
|
46
46
|
|
47
47
|
![イメージ説明](032858c33c43df9f5b5f2f821c5f8ff0.png)
|
48
48
|
|
49
|
+
|
50
|
+
|
51
|
+
functions.phpの中身はこうなっております。
|
52
|
+
|
53
|
+
```
|
54
|
+
|
55
|
+
<?php
|
56
|
+
|
57
|
+
add_theme_support( 'post-thumbnails', array( 'page','post' ) );
|
58
|
+
|
59
|
+
?>
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
<?php
|
66
|
+
|
67
|
+
register_sidebar( array(
|
68
|
+
|
69
|
+
'name' => '新規ウィジェット',
|
70
|
+
|
71
|
+
'id' => 'test',
|
72
|
+
|
73
|
+
'description' => '新規ウィジェットエリア',
|
74
|
+
|
75
|
+
'before_widget' => 'ウィジェットの前に記述したいテキスト',
|
76
|
+
|
77
|
+
'after_widget' => 'ウィジェットの後に記述したいテキスト',
|
78
|
+
|
79
|
+
) );
|
80
|
+
|
81
|
+
?>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<?
|
88
|
+
|
89
|
+
add_the_support('menus');
|
90
|
+
|
91
|
+
?>
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<?php
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
//ここから
|
106
|
+
|
107
|
+
add_action( 'wp_footer', 'mycustom_wp_footer' );
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
function mycustom_wp_footer() {
|
112
|
+
|
113
|
+
?>
|
114
|
+
|
115
|
+
<script type="text/javascript">
|
116
|
+
|
117
|
+
if(jQuery('.wpcf7').length){ //formのclassが存在するか判定
|
118
|
+
|
119
|
+
var wpcf7Elm = document.querySelector( '.wpcf7' );
|
120
|
+
|
121
|
+
wpcf7Elm.addEventListener( 'wpcf7mailsent', function( event ) {
|
122
|
+
|
123
|
+
location.replace('http://localhost:8888/wordpress/contact/thanks/');
|
124
|
+
|
125
|
+
}, false );
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
</script>
|
130
|
+
|
131
|
+
<?php
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
//ここまで
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
?>
|
142
|
+
|
143
|
+
```
|
144
|
+
|
49
145
|
と記述して、キャッシュを行い確認画面と送信完了画面が表示されるか
|
50
146
|
|
51
147
|
試してみましたが
|