回答編集履歴
2
追記の追記
test
CHANGED
@@ -25,3 +25,95 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
```で表示できると思うのですが?
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
追記の追記
|
32
|
+
|
33
|
+
---
|
34
|
+
|
35
|
+
ul、li の代わりに div で括るということですかね?
|
36
|
+
|
37
|
+
以下のコードに変更すればいいのではないでしょうか。
|
38
|
+
|
39
|
+
```php
|
40
|
+
|
41
|
+
//Add 'starting' tag. Here, I'm using an unordered list (ul) as an example:
|
42
|
+
|
43
|
+
$lcp_display_output .= '<ul class="lcp_catlist">';
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
↓
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
$lcp_display_output .= '<div class="lcp_catlist">';
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
```
|
56
|
+
|
57
|
+
カスタム投稿のスラッグを class にしています。
|
58
|
+
|
59
|
+
```php
|
60
|
+
|
61
|
+
//Start a List Item for each post:
|
62
|
+
|
63
|
+
$lcp_display_output .= "<li>";
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
↓
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
$labo = get_post_type( get_the_ID() );
|
72
|
+
|
73
|
+
$lcp_display_output .= "<div class='".$labo."'>";
|
74
|
+
|
75
|
+
```
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
```php
|
82
|
+
|
83
|
+
//Close li tag
|
84
|
+
|
85
|
+
$lcp_display_output .= '</li>';
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
↓
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
$lcp_display_output .= '</div>';
|
94
|
+
|
95
|
+
```
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
```php
|
102
|
+
|
103
|
+
// Close the wrapper I opened at the beginning:
|
104
|
+
|
105
|
+
$lcp_display_output .= '</ul>';
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
↓
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
$lcp_display_output .= '</div>';
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
参考まで。
|
1
とりあえず
test
CHANGED
@@ -9,3 +9,19 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
参考まで。
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
追記:参考まで
|
16
|
+
|
17
|
+
---
|
18
|
+
|
19
|
+
えーっと、テンプレートカスタマイズでタイトルの前に(//Show the title and link to the post:)
|
20
|
+
|
21
|
+
```php
|
22
|
+
|
23
|
+
$lcp_display_output .= esc_html( get_post_type_object(get_post_type( get_the_ID() ))->label );
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```で表示できると思うのですが?
|