<?php
/*
    Template Name: Blog Style 2
*/
?>
<?php get_header();?>
            <div id="main" class="container">
            	<div class="row">
            	<div id="mainContent">
					<div class="span9 blogstyle4">
                    	
       						<?php 
											$temp = $wp_query; $wp_query= null;
											$wp_query = new WP_Query(); $wp_query->query('showposts=10' . '&paged='.$paged);
											while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
	
		
                    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                            <div class="hentryContent">
                                <div class="postContent">
                                    <div class="postTitle">
                                    
                                        <h4><a href="<?php the_permalink();?>"><?php 
											$badge_text = get_post_meta($post->ID, 'lioit_post_badge_text', true);
											$badge_color = get_post_meta($post->ID, 'lioit_post_badge_color', true);
										?>
                                        <?php if ($badge_text) { ?>
                                        <div class="articleType" style="background-color:<?php echo $badge_color; ?>;"><?php echo $badge_text; ?></div>
                                        <?php } ?><?php the_title(); ?></a></h4>
                                    </div><!--End PostTitle-->
                                    <div class="postMetaContainer">
                                        <ul class="postMeta">
                                      		<?php
                                            $lioit_review_enable =  get_post_meta($post->ID, 'lioit_review_enable', true);
                                            $lioit_review_type =  get_post_meta($post->ID, 'lioit_review_type', true);
                                            $lioit_final_score =  get_post_meta($post->ID, 'lioit_final_score', true);
                                            $lioit_final_percentage = $lioit_final_score * 20 ;
                                        	?>
                                        	<?php if($lioit_review_enable == 'enable'){ ?>
                                            <li>
                                            	<span class="lioit-rating lioit-rating-<?php echo esc_html($lioit_review_type); ?>">
                                                	<span style="width:<?php echo esc_html($lioit_final_percentage); ?>%;"></span>
                                                </span>
                                            </li>
											<?php } ?>
                                            <?php if(!empty($smof_data['show_viewsmeta'])) { ?>
                                            <li class="postViews"><?php echo getPostViews($post->ID); ?> </li>
                                            <?php } ?>
                                      		<?php if(!empty($smof_data['show_postdate'])) { ?>
                                            <li class="postDateMeta"><?php the_time('F d, Y'); ?></li>
                                            <?php } ?>
                                            <?php if(!empty($smof_data['show_postauthor'])) { ?>
                                            <li class="postAuthor"><?php _e('By','lioit') ?> <?php the_author_posts_link(); ?></li>
                                            <?php } ?>
                                            <?php if(!empty($smof_data['show_postcat'])) { ?>
                                            <li class="postCategory"><?php _e('in','lioit') ?> <?php the_category(', ') ?></li>
                                            <?php } ?>
                                            <?php if(!empty($smof_data['show_postcomm'])) { ?>
                                            <li class="postComments"><?php comments_popup_link(__('<span class="icon"></span> 0 Comments', 'lioit'), __('<span class="icon"></span> 1 Comment', 'lioit'), __('<span class="icon"></span> % Comments', 'lioit')); ?></li><?php } ?>
                                            
                                        </ul><!--End postMeta-->
                                    </div><!--End PostMetaContainer-->
                                    <div class="postImage leftPostThumb ">
                                    	
                                        <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
                                        <?php the_post_thumbnail('main-block', array('title' => strip_tags(get_the_title()))); ?>
                                        </a>
                                    </div><!--End postImage-->
                                    <p><?php echo excerpt(60); ?></p>
                                </div><!--End PostContent-->
                                <div class="postBtm">
                                    <div class="postTags">
                                        <span class="tagsTitle"><i class="icon-tags"></i> <?php _e('Tags','lioit') ?></span>
                                        <?php the_tags('','',''); ?>
                                    </div><!--End PostTags-->
                                    <a href="<?php the_permalink();?>" class="postMore btn"><?php _e('Read More' , 'lioit' ) ?></a>
                                </div><!--End PostBtm-->
                            </div><!--End hentryConent-->
                        </article><!--End article-->
                        <?php endwhile; ?>
					
                        <div class="mainPagination">
                            <div class="pagesNambers"><?php lio_pagination(); ?></div><!--En Nambers-->
                            <?php
                             if( get_next_posts_link() || get_previous_posts_link() ) { ?>
                                <div class="paginationLinks">
                                    <?php previous_posts_link('<i class="icon-angle-left"></i>'); ?>
                                    <?php next_posts_link('<i class="icon-angle-right"></i>'); ?>
                                </div>	
                            <?php } ?>
                        </div><!--End MainBagination-->
       
                        <?php wp_reset_postdata(); ?>
                        
                    </div><!--End ContentBox-->
                    <?php get_sidebar();?>
                </div><!--End Row-->
                </div><!--End Container-->
            </div><!--End Main-->
        </div><!--End Content-->
<?php get_footer();?>
