質問編集履歴
1
質問内容を改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,148 +14,94 @@
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
|
17
|
-
|
17
|
+
* テーマのセットアップ
|
18
18
|
|
19
|
-
|
19
|
+
* 参考:https://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/add_theme_support#HTML5
|
20
20
|
|
21
|
-
|
21
|
+
**/
|
22
22
|
|
23
|
-
* installation. You don't have to use the web site, you can
|
24
|
-
|
25
|
-
* copy this file to "wp-config.php" and fill in the values.
|
26
|
-
|
27
|
-
*
|
28
|
-
|
29
|
-
* This file contains the following configurations:
|
30
|
-
|
31
|
-
*
|
32
|
-
|
33
|
-
* * MySQL settings
|
34
|
-
|
35
|
-
* * Secret keys
|
36
|
-
|
37
|
-
* * Database table prefix
|
38
|
-
|
39
|
-
* * ABSPATH
|
40
|
-
|
41
|
-
*
|
42
|
-
|
43
|
-
|
23
|
+
// テーマやプラグインが特定のテーマ機能のサポートを許可する
|
44
|
-
|
45
|
-
*
|
46
|
-
|
47
|
-
* @package WordPress
|
48
|
-
|
49
|
-
*/
|
50
24
|
|
51
25
|
|
52
26
|
|
53
|
-
|
27
|
+
function my_setup()
|
54
28
|
|
55
|
-
|
29
|
+
{
|
56
30
|
|
31
|
+
add_theme_support('post-thumbnails'); // アイキャッチ画像を有効化
|
32
|
+
|
57
|
-
de
|
33
|
+
add_image_size('blog_thumbnail', 400, 300, true);
|
34
|
+
|
35
|
+
add_theme_support('automatic-feed-links'); // 投稿とコメントのRSSフィードのリンクを有効化 上に同様
|
36
|
+
|
37
|
+
add_theme_support('title-tag'); // タイトルタグ自動生成 上に同様
|
38
|
+
|
39
|
+
add_theme_support(
|
40
|
+
|
41
|
+
'html5',
|
42
|
+
|
43
|
+
array( //HTML5でマークアップ この機能は、コメントフォーム、検索フォーム、コメントリスト、ギャラリーでHTML5マークアップの使用を許可するもの
|
44
|
+
|
45
|
+
'search-form',
|
46
|
+
|
47
|
+
'comment-form',
|
48
|
+
|
49
|
+
'comment-list',
|
50
|
+
|
51
|
+
'gallery',
|
52
|
+
|
53
|
+
'caption',
|
54
|
+
|
55
|
+
)
|
56
|
+
|
57
|
+
);
|
58
|
+
|
59
|
+
}
|
58
60
|
|
59
61
|
|
60
62
|
|
61
|
-
|
63
|
+
add_action('after_setup_theme', 'my_setup'); //特定のアクションに関数をフック(後追い?)させる
|
62
64
|
|
63
|
-
|
65
|
+
// セットアップの書き方の型
|
64
66
|
|
67
|
+
// function custom_theme_setup() {
|
65
68
|
|
69
|
+
// add_theme_support( $feature, $arguments );
|
66
70
|
|
67
|
-
/
|
71
|
+
// }
|
68
72
|
|
69
|
-
define( 'DB_PASSWORD', 'root' );
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
/** MySQL hostname */
|
74
|
-
|
75
|
-
d
|
73
|
+
// add_action( 'after_setup_theme', 'custom_theme_setup' );
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
/** Database Charset to use in creating database tables. */
|
80
|
-
|
81
|
-
define( 'DB_CHARSET', 'utf8' );
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
/** The Database Collate type. Don't change this if in doubt. */
|
86
|
-
|
87
|
-
define( 'DB_COLLATE', '' );
|
88
74
|
|
89
75
|
|
90
76
|
|
91
77
|
/**
|
92
78
|
|
93
|
-
|
79
|
+
* CSSとJavaScriptの読み込み
|
94
80
|
|
95
|
-
|
81
|
+
*
|
96
82
|
|
97
|
-
|
83
|
+
* @codex https://wpdocs.osdn.jp/%E3%83%8A%E3%83%93%E3%82%B2%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%83%A1%E3%83%8B%E3%83%A5%E3%83%BC
|
98
84
|
|
99
|
-
|
85
|
+
*/
|
100
86
|
|
101
|
-
|
87
|
+
function my_script_init()
|
102
88
|
|
103
|
-
|
89
|
+
{
|
104
90
|
|
105
|
-
|
91
|
+
wp_enqueue_style('fontawesome', 'https://use.fontawesome.com/releases/v5.8.2/css/all.css', array(), '5.8.2', 'all');
|
106
92
|
|
107
|
-
|
93
|
+
//cssを読み込むもの
|
108
94
|
|
109
|
-
|
95
|
+
wp_enqueue_style('my', get_template_directory_uri() . '/css/style.css', array(), '1.0.0', 'all');
|
110
96
|
|
111
|
-
|
97
|
+
//cssを読み込むもの
|
112
98
|
|
113
|
-
|
99
|
+
wp_enqueue_script('my', get_template_directory_uri() . '/js/script.js', array( 'jquery' ), '1.0.0', true);
|
114
100
|
|
115
|
-
define('NONCE_KEY', 'j3DcvNjkNCR3fXiY4KADRQKq/+qp55mYZLb1vDheCp8kOYEC482P//H7A0SYsyyGk8RnGg7KvbUSu085dwk19w==');
|
116
|
-
|
117
|
-
define('AUTH_SALT', 'YWNB5n8V7XjCssyfrGgMlc9gzKFPIdWWobjCRr71mVYcGKqx5D2ZGjA6sA9i64Y3R30L06CVjN/kKS89rr2tHg==');
|
118
|
-
|
119
|
-
define('SECURE_AUTH_SALT', 'TfMY+OnEoSN/JMGb0fcCDvgKMvv1e7hivxHfdxZ3uphszgWpbxEBg+D9gqd25GZ8QmMXHkeQCTCWuEfx2CeAsw==');
|
120
|
-
|
121
|
-
define('LOGGED_IN_SALT', 'CbXx+EWL+hhX4Hcoq3S+959OAXEI6bMzg/VQEZgWDEb/11Pqpaei8MG2M7wZcHMKjc5+RHrn78wZ3a1rHPw2cQ==');
|
122
|
-
|
123
|
-
define('NONCE_SALT', 'taKIRteHp6GHiH1gR0REFr9YFmUvU2uNH5a/5EyTojVPIRGdeqJFHV8PSwhrY4AzQjfJzb8dr2we+iUwbPUxNg==');
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
/**
|
128
|
-
|
129
|
-
* WordPress Database Table prefix.
|
130
|
-
|
131
|
-
*
|
132
|
-
|
133
|
-
* You can have multiple installations in one database if you give each
|
134
|
-
|
135
|
-
* a unique prefix. Only numbers, letters, and underscores please!
|
136
|
-
|
137
|
-
*/
|
138
|
-
|
139
|
-
|
101
|
+
//jsを読み込むもの
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
/* That's all, stop editing! Happy publishing. */
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
/** Absolute path to the WordPress directory. */
|
148
|
-
|
149
|
-
if ( ! defined( 'ABSPATH' ) ) {
|
150
|
-
|
151
|
-
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
|
152
102
|
|
153
103
|
}
|
154
104
|
|
155
|
-
|
156
|
-
|
157
|
-
/** Sets up WordPress vars and included files. */
|
158
|
-
|
159
|
-
|
105
|
+
add_action('wp_enqueue_scripts', 'my_script_init');//特定のアクションに関数をフック(後追い?)させる
|
160
106
|
|
161
107
|
```
|