-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
39 lines (28 loc) · 1.12 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
<?php
/**
* The template for displaying all single posts.
*
* @package Gridbox
*/
get_header(); ?>
<section id="primary" class="content-single content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
* Add conditionals `tni_is_subscription_only` and `tni_core_check_auth` to serve alternate content to non-subscribers
* Note: It could be a template-part or a page that you create
*/ ?>
<?php get_template_part( 'template-parts/content-single', get_post_type() ); ?>
<?php if ( class_exists( 'Jetpack_RelatedPosts' ) && 'post' == get_post_type() ) : ?>
<h2 class="relatedposts-title"><?php _e('Further Reading', 'tni'); ?></h2>
<?php echo do_shortcode( '[jetpack-custom-related]' ); ?>
<?php elseif( 'magazines' == get_post_type() ) : ?>
<?php get_template_part( 'template-parts/loop', 'related-posts' ); ?>
<?php endif; ?>
<?php comments_template(); ?>
<?php endwhile; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>