-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle-post.php
62 lines (56 loc) · 1.5 KB
/
single-post.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
<?php
/**
*
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Sunrise_National
*/
get_header();
get_template_part( 'template-parts/blog-parts/blog-navigation' );
?>
<div class="container">
<div class="row">
<div id="primary" class="content-area blog-single col-lg-12">
<main id="main" class="site-main">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content/content-blog', get_post_type() );
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
</div>
</div>
<div class="container post-footer">
<div class="row">
<div class="border-gradient-sunrise col-sm-8">
<div>
<h4 class="post-footer-text">
Want to start taking action to make a difference? Join one of upcoming campaigns and get involved!
</h4>
<a class="btn-primary btn" href="/take-action/">
Take Action with Sunrise
</a>
</div>
</div>
<div class="col post-next d-none d-md-flex">
<?php
$the_query = new WP_Query( array ( 'orderby' => 'date', 'posts_per_page' => '3', 'post__not_in' => array( $post->ID ) ) );
// output the random post
if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php get_template_part( 'template-parts/content/content-sidebar', 'sidebar' ); ?>
<?php endwhile;
// Reset Post Data
wp_reset_postdata();?>
<?php else : ?>
<p><?php __('No Posts'); ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php
get_footer();
?>