質問編集履歴

4

タグ修正

2020/07/18 04:43

投稿

Shinamon-roll
Shinamon-roll

スコア1

test CHANGED
File without changes
test CHANGED
File without changes

3

タグ修正

2020/07/18 04:43

投稿

Shinamon-roll
Shinamon-roll

スコア1

test CHANGED
File without changes
test CHANGED
File without changes

2

タグ修正

2020/07/18 04:42

投稿

Shinamon-roll
Shinamon-roll

スコア1

test CHANGED
File without changes
test CHANGED
File without changes

1

コードに投稿しなおしました

2020/07/18 01:30

投稿

Shinamon-roll
Shinamon-roll

スコア1

test CHANGED
File without changes
test CHANGED
@@ -26,85 +26,87 @@
26
26
 
27
27
 
28
28
 
29
+ ```
30
+
29
31
  <?php
30
32
 
31
33
  $terms = get_terms( 'seminar' );
32
34
 
33
35
  foreach ( $terms as $term ) :
34
36
 
35
- $args = array(
37
+ $args = array(
36
38
 
37
- 'post_type' => 'seminar',
39
+ 'post_type' => 'seminar',
38
40
 
39
- 'taxonomy' => 'seminar_category',
41
+ 'taxonomy' => 'seminar_category',
40
42
 
41
- 'term' => $term->slug,
43
+ 'term' => $term->slug,
42
44
 
43
- 'posts_per_page' => -1,
45
+ 'posts_per_page' => -1,
44
46
 
45
- 'no_found_rows' => true,
47
+ 'no_found_rows' => true,
46
48
 
47
- );
49
+ );
48
50
 
49
- $query = new WP_Query($args); ?>
51
+ $query = new WP_Query($args); ?>
50
52
 
51
-
52
53
 
53
- <h2 class="category_coursename"><?php echo esc_html( $term->name ); ?></h2>
54
54
 
55
-
55
+ <h2 class="category_coursename"><?php echo esc_html( $term->name ); ?></h2>
56
56
 
57
-
58
57
 
59
- <?php if ( $query->have_posts() ) : ?>
60
58
 
61
- <?php while ( $query->have_posts() ) : $query->the_post();?>
59
+ <?php if ( $query->have_posts() ) : ?>
62
60
 
63
- <section id="seminar">
61
+ <?php while ( $query->have_posts() ) : $query->the_post();?>
64
62
 
65
- <div class="seminar_list_box">
63
+ <section id="seminar">
66
64
 
67
- <ul>
65
+ <div class="seminar_list_box">
68
66
 
69
- <li class="schedule"><?php the_field( 'schedule-top' ); ?> 開催します</li>
67
+ <ul>
70
68
 
71
-
69
+ <li class="schedule"><?php the_field( 'schedule-top' ); ?> 開催します</li>
72
70
 
73
- <?php if( get_field('recruitment') == "on"): ?>
74
71
 
72
+
73
+ <?php if( get_field('recruitment') == "on"): ?>
74
+
75
- <li class="bosyuu">参加者募集しています</li>
75
+ <li class="bosyuu">参加者募集しています</li>
76
76
 
77
77
  <?php elseif( get_field('recruitment') == "off"): ?>
78
78
 
79
- <li class="no_bosyuu">募集は終了しました</li>
79
+ <li class="no_bosyuu">募集は終了しました</li>
80
80
 
81
81
  <?php endif; ?>
82
82
 
83
- </ul>
83
+ </ul>
84
84
 
85
- <?php echo $kind->name; ?>
85
+ <?php echo $kind->name; ?>
86
86
 
87
- <p class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></p>
87
+ <p class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></p>
88
88
 
89
- <?php the_field( 'seminar_explanation' ); ?>
89
+ <?php the_field( 'seminar_explanation' ); ?>
90
90
 
91
- <p class="cheack"><a href="<?php the_permalink() ?>">詳細ページへ</a></p>
91
+ <p class="cheack"><a href="<?php the_permalink() ?>">詳細ページへ</a></p>
92
92
 
93
- </div><!--END seminar_list_box-->
93
+ </div><!--END seminar_list_box-->
94
94
 
95
- </section>
95
+ </section>
96
96
 
97
- <?php endwhile;?>
97
+ <?php endwhile;?>
98
98
 
99
- <?php wp_reset_postdata(); ?>
99
+ <?php wp_reset_postdata(); ?>
100
100
 
101
- <?php endif; ?>
101
+ <?php endif; ?>
102
102
 
103
-
104
103
 
105
-
106
104
 
107
- <?php endforeach; ?>
105
+ <?php endforeach; ?>
106
+
107
+
108
+
109
+ ```
108
110
 
109
111
 
110
112