質問編集履歴

2

ショートコードの定義ファイルを追加で記載いたしました

2017/06/12 14:47

投稿

mein
mein

スコア13

test CHANGED
File without changes
test CHANGED
File without changes

1

コードも追加で記載させていただきました

2017/06/12 14:47

投稿

mein
mein

スコア13

test CHANGED
File without changes
test CHANGED
@@ -32,8 +32,94 @@
32
32
 
33
33
 
34
34
 
35
- > 【現在の翌月表示】
35
+ 【現在の翌月表示】
36
36
 
37
37
 
38
38
 
39
- > ![イメージ説明](1239eae72dbb0c41f30a40da985c9d07.png)
39
+ ![イメージ説明](1239eae72dbb0c41f30a40da985c9d07.png)
40
+
41
+
42
+
43
+
44
+
45
+ 【shortcodeのphp】
46
+
47
+ ```
48
+
49
+ <?php
50
+
51
+ global $eo_event_loop,$eo_event_loop_args;
52
+
53
+
54
+
55
+ //The list ID / classes
56
+
57
+ $id = ( $eo_event_loop_args['id'] ? 'id="' . $eo_event_loop_args['id'] . '"' : '' );
58
+
59
+ $classes = $eo_event_loop_args['class'];
60
+
61
+
62
+
63
+ ?>
64
+
65
+
66
+
67
+ <?php if ( $eo_event_loop->have_posts() ) : ?>
68
+
69
+
70
+
71
+ <ul <?php echo $id; ?> class="<?php echo esc_attr( $classes );?>" >
72
+
73
+
74
+
75
+ <?php while ( $eo_event_loop->have_posts() ) : $eo_event_loop->the_post(); ?>
76
+
77
+
78
+
79
+ <?php
80
+
81
+ //Generate HTML classes for this event
82
+
83
+ $eo_event_classes = eo_get_event_classes();
84
+
85
+
86
+
87
+ //For non-all-day events, include time format
88
+
89
+ $format = eo_get_event_datetime_format();
90
+
91
+ ?>
92
+
93
+
94
+
95
+ <li class="<?php echo esc_attr( implode( ' ',$eo_event_classes ) ); ?>" >
96
+
97
+ <a href="<?php echo eo_get_permalink(); ?>"><?php the_title(); ?></a> <?php echo __( 'on','eventorganiser' ) . ' ' . eo_get_the_start( $format ); ?>
98
+
99
+ </li>
100
+
101
+
102
+
103
+ <?php endwhile; ?>
104
+
105
+
106
+
107
+ </ul>
108
+
109
+
110
+
111
+ <?php elseif ( ! empty( $eo_event_loop_args['no_events'] ) ) : ?>
112
+
113
+
114
+
115
+ <ul id="<?php echo esc_attr( $id );?>" class="<?php echo esc_attr( $classes );?>" >
116
+
117
+ <li class="eo-no-events" > <?php echo $eo_event_loop_args['no_events']; ?> </li>
118
+
119
+ </ul>
120
+
121
+
122
+
123
+ <?php endif;>
124
+
125
+ ```