<?php



/**



 * The front page template file



 *



 * If the user has selected a static page for their homepage, this is what will



 * appear.



 * Learn more: https://codex.wordpress.org/Template_Hierarchy



 *



 * @package WordPress



 * @subpackage Twenty_Seventeen



 * @since 1.0



 * @version 1.0



 */







get_header(); ?>



<style>



.nav-class {



	border-bottom:none;



}



</style>











<div id="primary" class="content-area">



	<main id="main" class="site-main" role="main">



	<div class="full wrapper-ceter-section">



    	<div class="container">



		<?php



		 $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;



$args=array(



  'orderby'=>'post_date',



  'order'=>'DESC',



  'post_type' => 'post',



   'posts_per_page' => 10,



    'paged' => $paged



);



$my_query = new WP_Query($args);



if( $my_query->have_posts() ) {



	?>



    



    	<div class="posts-pagination-wrapper">



			<?php



			/* Start the Loop */



			while ($my_query->have_posts()) : $my_query->the_post(); 



			



			$post = get_post(get_the_ID());



			$Postid = $post->ID;



			$format = 'M d Y';



			$thumb_url = get_the_post_thumbnail( $Postid, 'homepage-thumb' );



			$post_title = $post->post_title;



			$post_date = get_the_date( $format, $Postid ); 

			$author_id = $post->post_author; 
			$authour_name = get_the_author_meta('display_name',$author_id );
			$author_url =  get_author_posts_url($author_id);

			?>



            



			



            	<div class="posts-paginaion-single">



                	<div class="post-page-image">



                    	<a href="<?php echo get_permalink($Postid); ?>"><?php echo $thumb_url;  ?></a>



                    </div>



                    <div class="post-page-content">



                    	<h1><?php echo $post->post_title;  ?></h1>



                        <span class="date-time left"><?php echo $post_date; ?></span>&nbsp;
                        <span class="right"><span class="date-time author_name_tag">Author:</span> 
                        <a class="author_name_hp" href="<?php echo $author_url; ?>">
                    		<?php  
                    		
                        		echo $authour_name;		
                         	?>
                         </a></span>
                         <div class="clear"></div>



                        <p><?php echo wp_trim_words($post->post_content, 35, '...'); ?></p>



                        <div class="read-more-and-social-links">



                        	<a class="continue-reading" href="<?php echo get_permalink($Postid); ?>">continue Reading</a>



                            <?php echo do_shortcode('[apss_share]'); ?>



                        </div>



                    </div>



                    <div class="clear"></div>



                </div>



                <?php



			endwhile;



			



			 ?>



             <div class="clear"></div>



            



			<div class="pagination-bottom">



            <?php if (function_exists('wp_pagenavi')) { wp_pagenavi( array( 'query' => $my_query ) ); } ?>



		<div class="clear"></div>



            </div>



            <?php



}



wp_reset_query();



			 ?>



            </div>











            <div class="right-side-bar">



            	<div class="about-us-wrapper">



                <?php



                	$about_post = get_post(6);



				?>



                	<h1><?php echo $about_post->post_title; ?></h1>



                	<div class="about-image">



                    	<img src="<?php echo get_template_directory_uri(); ?>/images/about-me.jpg" alt="bout us" />



                    	<div class="name_position">



                        	<span></span>



                            <span style="font-size:14px;"></span>



                        </div>



                    </div>



                    <div class="about-text">



                    	<p><?php echo wp_trim_words($about_post->post_content, 70, '... <a href="'.  get_permalink($about_post->ID) .'">Read More </a>') ?></p>



                    </div>



                </div>



                <div class="ads-sec">



                	<!--<img src="<?php //echo get_template_directory_uri(); ?>/images/ads-imge.jpg" alt="ads" />-->

                	<?php dynamic_sidebar( 'Advertisment Banner' ); ?>



                </div>



                <div class="popular-posts-wrapper">



                	<h1>Popular Post</h1>



					<?php



							 $args =  new WP_Query ( array(



								'posts_per_page'   => 5,



								'meta_key' => 'post_views_count',

    								'orderby' => 'meta_value_num',



								'post_type'        => 'post',

								'order' => 'DESC'

								/*'meta_key' => 'wpb_post_views_count',



								'orderby' => 'meta_value_num',*/





							));



							$pop_posts = get_posts($args);



                    		foreach ( $pop_posts as $post ) : setup_postdata( $post ); 



							$Postid = $post->ID;



							$format = 'M d Y';



							$thumb_url = get_the_post_thumbnail( $Postid, 'popularpost-thumb' );



							$post_title = $post->post_title;



							$post_date = get_the_date( $format, $Postid ); 







					?>                    



                    <div class="single_post_pop">



                    	<div  class="pop_post_image">



                        	<a href="<?php echo get_permalink($Postid); ?>"><?php echo $thumb_url ?></a>



                        </div>



                        <div class="pop_post_text">



                        	<a href="<?php echo get_permalink($Postid); ?>"><?php  echo $post->post_title; ?></a>



                            <span class="date-time"><?php  echo $post_date; ?></span>



                        </div>



                        <div class="clear"></div>



                    </div>



              <?php



					$post_counter++;



                	endforeach;



					wp_reset_postdata();?>



                </div>



                <div class="subscribe-follow">



                	<h1>Subscribe & Follow</h1>



                     <?php echo wen_social_links(); ?> 



                </div>



                <div class="insta-feed">



                	<h1>Instagram Feed</h1>



	<?php  do_shortcode('[instagram-feed num=9 cols=3]'); ?>







                    <span>@thespecialwomen</span>



                </div>



                <div class="news-letter">



                	<h1>Subscribe our Newsletter</h1>



					<?php dynamic_sidebar( 'Subscription Form' ); ?> 



                </div>



                <div class="tags_all">



                	<h1>Tags</h1>



                    <?php



                    $tags = get_tags();



						$html = '<div class="post_tags"><ul>';



						foreach ( $tags as $tag ) {



							$tag_link = get_tag_link( $tag->term_id );



									 



							$html .= "<li><a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";



							$html .= "{$tag->name}</li></a>";



						}



						$html .= '</ul></div>';



						echo $html;



					?>



                    



                </div>



            </div>



            <div class="clear"></div>



        </div>



    </div>











	</main><!-- #main -->



</div><!-- #primary -->







<?php get_footer();



