-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
52 lines (31 loc) · 1.31 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
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* @author madars.bitenieks
* @copyright 2011
*/
get_header();
global $post, $col_4, $col_8;
$mt_layout = get_post_meta(get_the_ID(), "layout_positions", true);
$mt_float_layout = "";
$mt_float_sidebar = "";
if ($mt_layout == "left") {
$mt_float_layout = "floatright";
$mt_float_sidebar = "floatleft";
}
?>
<div class="row">
<div class="col-md-<?php if ($mt_layout != "full") { echo "8 "; echo $col_8; } else { echo "12 "; } echo $mt_float_layout; ?> ">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<nav class="nav-single">
<span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span>
<span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
</nav><!-- .nav-single -->
<?php if ( comments_open() || '0' != get_comments_number() ) comments_template( '', true ); ?>
<?php endwhile; ?>
</div>
<?php if ($mt_layout != "full") { ?>
<div class="col-md-4 <?php echo $mt_float_sidebar; echo $col_4; ?> "><?php get_sidebar(); ?></div>
<?php } ?>
</div>
<?php get_footer(); ?>