-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
67 lines (53 loc) · 1.84 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package real_realty
*/
$blog_post_options = get_field('feature_options');
$blog_archive_options = get_field('blog_archive', 'option');
$show_sidebar = $blog_archive_options['show_sidebar'];
$show_title = $blog_post_options['show_post_title'];
$show_featured_image = $blog_post_options['show_featured_image'];
$blog_post_class_list = "blog-post";
if ($show_sidebar) {
$blog_post_class_list .= " with-sidebar--right";
}
get_header();
?>
<div class="<?php echo $blog_post_class_list; ?>">
<main id="primary" class="site-main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ($show_featured_image) :
stratford_partners_post_thumbnail();
endif;
?>
<?php if ($show_title) : ?>
<header class="entry-header">
<?php the_title( '<h1 class="post-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php endif; ?>
<section class="entry-content stack">
<?php the_content(); ?>
</section>
</article>
<?php
// the_post_navigation(
// array(
// 'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'stratford-partners' ) . '</span> <span class="nav-title">%title</span>',
// 'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'stratford-partners' ) . '</span> <span class="nav-title">%title</span>',
// )
// );
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
<?php
get_sidebar();
?>
</div> <!-- .blog-post-with-sidebar -->
<?php
get_footer();