forked from themebeans/ava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
executable file
·49 lines (39 loc) · 1.2 KB
/
single.php
File metadata and controls
executable file
·49 lines (39 loc) · 1.2 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
<?php
/**
* The template for displaying all single posts.
*
* @package Ava
* @link https://themebeans.com/themes/ava
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
while ( have_posts() ) :
the_post();
// Let's check if Beaver Builder is active and this is a single portfolio post.
if ( is_singular( 'portfolio' ) ) {
get_template_part( 'components/portfolio/single-portfolio' );
} else {
get_template_part( 'components/post/content', get_post_format() );
}
/*
* If comments are open or we have at least one comment, load up the comment template.
*
* @link https://codex.wordpress.org/Function_Reference/comments_open/
* @link https://codex.wordpress.org/Template_Tags/get_comments_number/
* @link https://developer.wordpress.org/reference/functions/comments_template/
*/
if ( 'portfolio' !== get_post_type() && ( comments_open() || get_comments_number() ) ) :
comments_template();
endif;
endwhile;
?>
</main>
</div>
<?php
// Let's display the post minibar on singular posts only.
if ( is_singular( 'post' ) ) {
get_template_part( 'components/post/minibar' );
}
get_footer();