generated from mrengy/wordpress-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.php
133 lines (120 loc) · 3.13 KB
/
content.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Vanguard_History
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_singular() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php
vanguard_history_posted_on();
vanguard_history_posted_by();
?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<?php
vanguard_history_post_thumbnail();
//only show year story video on single year story pages
if(is_single()){
$year_story_video = get_field('year_story_video');
if(isset($year_story_video)){
echo(
'<div id ="year story video">'.
$year_story_video.
'</div>'
);
}
if(has_excerpt()){
the_excerpt();
}
}
?>
<div class="entry-content">
<section id="story">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'vanguard-history' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'vanguard-history' ),
'after' => '</div>',
)
);
?>
</section><!--story-->
<section id="show-info">
<h2 id="repertoire">
Repertoire
</h2>
<div id="show-title">
<?php the_field('show_title');?>
</div>
<?php
$show_piece_counter = 0;
// need a better if statement - to detect if there are show pieces whose child elements have non-empty values
if(have_rows('show_pieces')){
//$show_piece_fields = get_field_object('show_pieces');
$show_pieces = get_field('show_pieces');
?>
<dl id="show-pieces">
<?php
while(have_rows('show_pieces')){ the_row();
foreach($show_pieces as $show_piece){
if( empty($show_piece['show_piece_title'] )){
continue;
} else {
echo("<dt>".$show_piece['show_piece_title']."</dt>");
echo("<dd>".$show_piece['show_piece_composer']."</dd>");
do_action( 'qm/debug', $show_piece );
}
}
?>
<?php
} //while(have_rows)('show_pieces')): the_row():
?>
</dl>
<?php
} //have_rows('show_pieces')
?>
<div id="final-score-info">
<h2 id="final-score-heading">
Final Score
</h2>
<div id="final-score">
<?php the_field('final_score');?>
</div>
<div id="final-placement">
(<?php the_field('final_placement');?>)
</div>
</div>
</section><!-- show-info-->
</div><!-- .entry-content -->
<footer class="entry-footer ui container">
<?php vanguard_history_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->