single.php 2.89 KB
Newer Older
agnez's avatar
agnez committed
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
<?php
/**
 * The Template for displaying all single posts.
 *
 * @package multipurpose blog
 */

get_header(); ?>

<div class="container">
    <div class="middle-align">
    	<?php
            $left_right = get_theme_mod( 'multipurpose_blog_theme_options','One Column');
            if($left_right == 'Left Sidebar'){ ?>
            <div class="row">
	    		<div id="sidebar" class="col-md-4 col-sm-4"><?php dynamic_sidebar('sidebar-1'); ?></div>
				<div class="col-md-8 col-sm-8" id="content-blog">
					<?php while ( have_posts() ) : the_post(); 
						get_template_part( 'template-parts/content_single' ); 
					endwhile; // end of the loop. ?>
		       	</div>
	       	</div>
	    <?php }else if($left_right == 'Right Sidebar'){ ?>
		    <div class="row">
		       	<div class="col-md-8 col-sm-8" id="content-blog">
					<?php while ( have_posts() ) : the_post(); 
						get_template_part( 'template-parts/content_single' ); 
					endwhile; // end of the loop. ?>
		       	</div>
				<div id="sidebar" class="col-md-4 col-sm-4"><?php dynamic_sidebar('sidebar-1'); ?></div>
			</div>
		<?php }else if($left_right == 'One Column'){ ?>
			<div id="content-blog">
					<?php while ( have_posts() ) : the_post(); 
						get_template_part( 'template-parts/content_single' ); 
					endwhile; // end of the loop. ?>				
	       	</div>
	    <?php }else if($left_right == 'Three Columns'){ ?>
	    <div class="row">
			<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
			<div class="col-md-6 col-sm-6" id="content-blog">
					<?php while ( have_posts() ) : the_post(); 
						get_template_part( 'template-parts/content_single' ); 
					endwhile; // end of the loop. ?>					
	       	</div>
			<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
		</div>
		<?php }else if($left_right == 'Four Columns'){ ?>
			<div class="row">
				<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
				<div class="col-md-3 col-sm-3" id="content-blog">
					<?php while ( have_posts() ) : the_post(); 
						get_template_part( 'template-parts/content_single' ); 
					endwhile; // end of the loop. ?>
		       	</div>
				<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
				<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
			</div>
		<?php }else if($left_right == 'Grid Layout'){ ?>
			<div class="row">
				<div class="col-md-8 col-sm-8" id="content-blog">
					<?php while ( have_posts() ) : the_post(); 
						get_template_part( 'template-parts/content_single' ); 
					endwhile; // end of the loop. ?>
		       	</div>
				<div id="sidebar" class="col-md-4 col-sm-4"><?php dynamic_sidebar('sidebar-2'); ?></div>
			</div>
		<?php }?>
	    <div class="clearfix"></div>
    </div>
</div>
<?php get_footer(); ?>