forked from 9IPHP/9IPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
30 lines (26 loc) · 853 Bytes
/
Copy pathsingle.php
File metadata and controls
30 lines (26 loc) · 853 Bytes
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
<?php
$layout = of_get_option('side_bar');
$layout = (empty($layout)) ? 'right_side' : $layout;
get_header();
if($layout == 'left_side'){ ?>
<aside class="col-md-4 hidden-xs hidden-sm">
<div id="sidebar">
<?php dynamic_sidebar( 'sidebar_single'); ?>
</div>
</aside>
<?php } ?>
<section id='main' class='<?php echo ($layout == 'single') ? 'col-md-12' : 'col-md-8'; ?>' >
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php specs_set_post_views(get_the_ID()); ?>
<?php get_template_part( 'inc/post-format/single', get_post_format() ); ?>
<?php endwhile; endif;?>
</section>
<!--侧边栏-->
<?php if($layout == 'right_side'){ ?>
<aside class="col-md-4 hidden-xs hidden-sm">
<div id="sidebar">
<?php dynamic_sidebar( 'sidebar_single'); ?>
</div>
</aside>
<?php } ?>
<?php get_footer(); ?>