-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
executable file
·79 lines (69 loc) · 1.98 KB
/
Copy pathsingle.php
File metadata and controls
executable file
·79 lines (69 loc) · 1.98 KB
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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Royale_News
*/
get_header();
/**
* Hook - royale_news_breadcrumb.
*
* @hooked royale_news_breadcrumb_action - 10
*/
do_action( 'royale_news_breadcrumb' );
$royale_news_sidebar_position = royale_news_get_option( 'royale_news_sidebar_position' );
$primary_container_class = '';
if ( 'left' === $royale_news_sidebar_position || 'right' === $royale_news_sidebar_position ) {
$primary_container_class = 'royale-news-sidebar-position-' . $royale_news_sidebar_position;
}
?>
<div id="primary" class="content-area <?php royale_news_inner_container_class(); ?> <?php echo esc_attr( $primary_container_class ); ?>">
<main id="main" class="site-main">
<div class="container">
<div class="row">
<?php
if (
'none' === $royale_news_sidebar_position ||
! is_active_sidebar( 'sidebar-1' )
) {
$class = 'col-md-12';
} else {
$class = 'col-md-8';
}
if ( 'left' === $royale_news_sidebar_position ) {
get_sidebar();
}
?>
<div class="<?php echo esc_attr( $class ); ?> sticky-section">
<div class="row">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', 'single' );
/**
* Hook - royale_news_post_navigation.
*
* @hooked royale_news_post_navigation_action - 10
*/
do_action( 'royale_news_post_navigation' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
}
?>
</div><!-- .row.clearfix.news-section -->
</div>
<?php
if ( 'right' === $royale_news_sidebar_position ) {
get_sidebar();
}
?>
</div><!-- .row.section -->
</div><!-- .container -->
</main><!-- .main-container -->
</div>
<?php
get_footer();