<?php get_header();?>
            <div id="main">
            	<?php
				$sideoption = get_post_meta($post->ID, 'lioit_sideoption', true);
				$side_layout = get_post_meta($post->ID, 'lioit_side_layout', true);
				?>
            	
                <?php if($sideoption) { ?>
				<?php if($side_layout == "leftside") { ?>
					<div id="mainContentRight">
                        <div class="singlePost">
                            <?php if(have_posts()) : while(have_posts()) : the_post('');?>
                            <div class="article mainBorder">
                                <div class="articleDetails">
                                    <div class="articleTitle">
                                        <h1><?php the_title(); ?></h1>
                                    </div><!--End articleTitle-->
                                </div><!--End Article Details-->
                                <div class="articleContent">
                                    <?php the_content();?> 
                                </div><!--End ArticleContent-->
                                <div class="articleShare">
                                    
                                </div><!--End ArticleSahre-->
                            </div><!--End article-->
                            
                            <?php endwhile; ?>
                            <?php  else:  ?>
                            <?php  endif; ?>
                            <?php comments_template('', true); ?>
                        </div><!--End ContentBox-->
                    </div><!--End Main Content-->
                    <div id="sidebarLeft">
                        <div id="mainWidgets">
                            <?php global $wp_query; $postid = $wp_query->post->ID; $cus = get_post_meta($postid, 'sbg_selected_sidebar_replacement', true);?>
                            <?php if ($cus != '') { ?>
                            <?php if ($cus[0] != '0') { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar($cus[0])){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } else { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Main sidebar')){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } ?>
                            <?php } else { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Main sidebar')){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } ?>
                        </div><!--End Main Widgets-->
                    </div><!--End Sidebar-->
                <?php } elseif($side_layout =="fullwidth") { ?>
					<div id="fullContent">
                        <div class="singlePost">
                            <?php if(have_posts()) : while(have_posts()) : the_post('');?>
                            <div class="article mainBorder">
                                <div class="articleDetails">
                                    <div class="articleTitle">
                                        <h1><?php the_title(); ?></h1>
                                    </div><!--End articleTitle-->
                                </div><!--End Article Details-->
                                <div class="articleContent">
                                    <?php the_content();?> 
                                </div><!--End ArticleContent-->
                                <div class="articleShare">
                                    
                                </div><!--End ArticleSahre-->
                            </div><!--End article-->
                            
                            <?php endwhile; ?>
                            <?php  else:  ?>
                            <?php  endif; ?>
                            <?php comments_template('', true); ?>
                        </div><!--End ContentBox-->
                    </div><!--End Main Content-->
                <?php } else { ?>
                	<div id="mainContent">
                        <div class="singlePost">
                            <?php if(have_posts()) : while(have_posts()) : the_post('');?>
                            <div class="article mainBorder">
                                <div class="articleDetails">
                                    <div class="articleTitle">
                                        <h1><?php the_title(); ?></h1>
                                    </div><!--End articleTitle-->
                                </div><!--End Article Details-->
                                <div class="articleContent">
                                    <?php the_content();?> 
                                </div><!--End ArticleContent-->
                                <div class="articleShare">
                                    
                                </div><!--End ArticleSahre-->
                            </div><!--End article-->
                            
                            <?php endwhile; ?>
                            <?php  else:  ?>
                            <?php  endif; ?>
                            <?php comments_template('', true); ?>
                        </div><!--End ContentBox-->
                    </div><!--End Main Content-->
                    <div id="sidebar">
                        <div id="mainWidgets">
                            <?php global $wp_query; $postid = $wp_query->post->ID; $cus = get_post_meta($postid, 'sbg_selected_sidebar_replacement', true);?>
                            <?php if ($cus != '') { ?>
                            <?php if ($cus[0] != '0') { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar($cus[0])){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } else { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Main sidebar')){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } ?>
                            <?php } else { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Main sidebar')){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } ?>
                        </div><!--End Main Widgets-->
                    </div><!--End Sidebar-->
                <?php } ?>
                <?php } else { ?>
					<div id="mainContent">
                        <div class="singlePost">
                            <?php if(have_posts()) : while(have_posts()) : the_post('');?>
                            <div class="article mainBorder">
                                <div class="articleDetails">
                                    <div class="articleTitle">
                                        <h1><?php the_title(); ?></h1>
                                    </div><!--End articleTitle-->
                                </div><!--End Article Details-->
                                <div class="articleContent">
                                    <?php the_content();?> 
                                </div><!--End ArticleContent-->
                                <div class="articleShare">
                                    
                                </div><!--End ArticleSahre-->
                            </div><!--End article-->
                            
                            <?php endwhile; ?>
                            <?php  else:  ?>
                            <?php  endif; ?>
                            <?php comments_template('', true); ?>
                        </div><!--End ContentBox-->
                    </div><!--End Main Content-->
                    <div id="sidebar">
                        <div id="mainWidgets">
                            <?php global $wp_query; $postid = $wp_query->post->ID; $cus = get_post_meta($postid, 'sbg_selected_sidebar_replacement', true);?>
                            <?php if ($cus != '') { ?>
                            <?php if ($cus[0] != '0') { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar($cus[0])){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } else { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Main sidebar')){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } ?>
                            <?php } else { ?>
                            <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Main sidebar')){ }else { ?>
                            <p class="noside">
                              <?php _e('There Is No Sidebar Widgets Yet', 'lioit'); ?>
                            </p>
                            <?php } ?>
                            <?php } ?>
                        </div><!--End Main Widgets-->
                    </div><!--End Sidebar-->
                <?php } ?>
            </div><!--End Main-->
            <?php require Lioit_TM . '/lio.php';?>
        </div><!--End Content-->
		<!-- www.20script.ir -->
<?php get_footer();?>
