-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-main-event.php
87 lines (68 loc) · 2.52 KB
/
page-main-event.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php get_header(); ?>
<main class="main">
<?php while( have_posts() ) : the_post(); ?>
<div class="post-meta">
<h1 class="post-title"><?php the_title(); ?></h1>
<?php $area = get_field( 'space' );
if ( $area ) : ?>
<p class="area"><span><?php echo esc_html( $area ); ?></span></p>
<?php endif; ?>
</div>
<?php if ( ! get_field( 'hide-post-thumbnail' ) && has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<div class="entry-content main-event-content">
<?php the_content(); ?>
<?php $args = array(
'numberposts' => -1,
'post_type' => 'main-event',
);
$main_events = get_posts( $args );
if ( $main_events ) : ?>
<?php foreach ( $main_events as $post ) : setup_postdata( $post );
$labels = get_field( 'labels' ); ?>
<div class="main-event keep-margin">
<h2><?php the_title(); ?></h2>
<div class="event-meta">
<?php if ( $labels ) : ?>
<p class="workshop-labels">
<?php foreach ( $labels as $label ) : ?>
<span class="label-<?php echo esc_attr( $label['value'] ); ?>"><?php echo esc_html( $label['label'] ); ?></span>
<?php endforeach; ?>
</p>
<?php endif; ?>
<p class="event-time">[<?php the_field( 'start-time' ); ?>−<?php the_field( 'ending-time' ); ?>]</p>
</div>
<div class="event-description">
<?php the_content(); ?>
</div>
<?php $entry_url = get_field( 'entry-url' );
if ( $entry_url ) : ?>
<div class="workshop-entry">
<?php $notes = get_field( 'notes' );
if ( $notes ) : ?>
<ul class="notes">
<?php foreach ( $notes as $note ) : ?>
<li><?php echo esc_html( $note['item'] ); ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<a href="<?php echo esc_url( $entry_url ); ?>" class="button button-primary workshop-entry-button" target="_blank">Entry</a>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
<?php $timetable = get_page_by_path( 'timetable' );
if ( 'publish' == get_post_status( $timetable ) ) : ?>
<div class="timetable-button-outer">
<a href="<?php echo esc_url( get_the_permalink( $timetable ) ); ?>" class="button button-secondary button-block timetable-button">Timetable</a>
<p>セッション・ワークショップのタイムテーブル</p>
</div>
<?php endif; ?>
</div>
<?php endwhile ?>
</main>
<?php get_footer(); ?>