質問編集履歴
3
必要なphpの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -47,6 +47,17 @@
|
|
47
47
|
top:18px;
|
48
48
|
}
|
49
49
|
```
|
50
|
+
jsとcssでダッシュボード内にカスタムブロックを生成するためfunction.phpに追加する記述
|
51
|
+
```php
|
52
|
+
/*------------
|
53
|
+
Gutenbergに対応したエディター独自タイル追加
|
54
|
+
------------*/
|
55
|
+
function add_my_assets_to_block_editor() {
|
56
|
+
wp_enqueue_style( 'block-style', get_stylesheet_directory_uri() . '/gutenberg/block_style.css' );
|
57
|
+
wp_enqueue_script( 'block-custom', get_stylesheet_directory_uri() . '/gutenberg/block_custom.js',array(), "", true);
|
58
|
+
}
|
59
|
+
add_action( 'enqueue_block_editor_assets', 'add_my_assets_to_block_editor' );
|
60
|
+
```
|
50
61
|
|
51
62
|
ひとまず追加したカスタムブロックを指定するとHTMLが以下のように変更されるのは出来ました。
|
52
63
|
```html
|
2
足りなかったcssを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,6 +23,13 @@
|
|
23
23
|
padding-right: 0;
|
24
24
|
background: url(../images/qa/icon_woman.gif) no-repeat top left;
|
25
25
|
}
|
26
|
+
p span{
|
27
|
+
display:block;
|
28
|
+
position:relative;
|
29
|
+
padding:24px 18px;
|
30
|
+
border:1px solid #999999;
|
31
|
+
border-radius:18px;
|
32
|
+
}
|
26
33
|
.is-style-woman span:before{
|
27
34
|
content: '';
|
28
35
|
border: 10px solid transparent;
|
1
間違えた画像を指定していた
title
CHANGED
File without changes
|
body
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
.is-style-woman{
|
22
22
|
padding-left: 84px;
|
23
23
|
padding-right: 0;
|
24
|
-
background: url(../images/qa/
|
24
|
+
background: url(../images/qa/icon_woman.gif) no-repeat top left;
|
25
25
|
}
|
26
26
|
.is-style-woman span:before{
|
27
27
|
content: '';
|