-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsingle.php
executable file
·45 lines (37 loc) · 941 Bytes
/
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
<?php
/**
* The template for displaying all single posts.
*
* @package berg-wp
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
$post_meta = get_post_meta(get_the_ID());
if (isset($post_meta['post_template'][0])) {
$post_template = $post_meta['post_template'][0];
if ($post_template != 'default' && $post_template != '') {
if ($post_template == 'post_template_2') {
get_template_part( 'content', 'single2' );
} else {
get_template_part( 'content', 'single' );
}
} else {
if (YSettings::g('berg_post_template') == 1) {
get_template_part( 'content', 'single' );
} else {
get_template_part( 'content', 'single2' );
}
}
} else {
get_template_part( 'content', 'single' );
}
if ( comments_open() || '0' != get_comments_number() ) {
comments_template();
}
?>
<?php endwhile; // end of the loop. ?>
<?php
berg_getFooter();
get_template_part('footer');
?>