-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
executable file
·44 lines (44 loc) · 1.53 KB
/
single.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
<?php get_header(); ?>
<main id="main">
<?php get_template_part( 'blocks/top_banner' ); ?>
<div class="container">
<div id="twocolumns">
<div id="content">
<?php while ( have_posts() ) : the_post(); ?>
<article class="article">
<?php if ( has_post_thumbnail() ) : ?>
<div class="visual-wrap"><?php the_post_thumbnail( 'thumbnail_794x342' );
echo get_post(get_post_thumbnail_id())->post_excerpt; ?></div>
<?php endif; ?>
<?php
the_title( '<h2>', '</h2>' );
the_content();
wp_link_pages();
comments_template();
?>
<?php
$submitter_title = get_field( "submitter_title" );
$submitter_first_name = get_field( "submitter_first_name" );
$submitter_last_name = get_field( "submitter_last_name" );
$submitter_state = get_field( "submitter_state" );
if( $submitter_title ) {
echo $submitter_title,' ',$submitter_first_name,' ',$submitter_last_name,', ',$submitter_state;
} else {
echo $submitter_first_name,' ',$submitter_last_name,', ',$submitter_state;
}
?>
<?php
$link = get_field( 'submit_story_link', 'option' );
$link_text = get_field( 'submit_story_link_text', 'option' );
?>
<?php if ( $link && $link_text ) : ?>
<div class="btn-wrap"><a href="<?php echo esc_url( $link ); ?>" class="btn"><?php echo esc_html( $link_text ); ?></a></div>
<?php endif; ?>
</article>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</main>
<?php get_footer(); ?>