File: /home/dailyajk/public_html/wp-content/themes/jphostbd-news12/page.php
<?php get_header() ?>
<?php global $jphostbd ?>
<section class="single_section">
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-9">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="sgl_about_photo">
<?php if(has_post_thumbnail()){
the_post_thumbnail();}
?>
</div>
<div class="sgl_about_title">
<?php the_title();?>
</div>
<div class="sgl_about_content">
<?php the_content();?>
</div>
<?php endwhile;?>
<?php endif;?>
</div>
<div class="col-md-4 col-sm-4">
<div class="add"><?php dynamic_sidebar('single_sidebar_top')?></div>
<div class="tab-header">
<!-- Nav tabs -->
<ul class="nav nav-tabs nav-justified" role="tablist">
<li role="presentation" class="active"><a href="#tab21" aria-controls="tab21" role="tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-line-chart"></i> <?php echo $jphostbd_themes['last'] ?></a></li>
<li role="presentation" ><a href="#tab22" aria-controls="tab22" role="tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-fire"></i> <?php echo $jphostbd_themes['popular'] ?></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane in active" id="tab21">
<?php
$x=1;
$lastnews = new WP_Query(array(
'post_type' => 'post',
'posts_per_page' => $jphostbd_themes['lastpost'],
'offset' =>0,
));
while($lastnews->have_posts()) : $lastnews->the_post();?>
<?php $xx=$x++ ?>
<div class="image-title">
<?php if(has_post_thumbnail()){
the_post_thumbnail();}
else{?>
<img src="<?php echo get_template_directory_uri(); ?>/assets/img/noimage.gif" width="100%" class="image"/>
<?php } ?>
<h4 class="heading-03"><a href="<?php the_permalink()?>"><?php the_title() ?></a></h4>
</div>
<?php endwhile ?>
</div>
<div role="tabpanel" class="tab-pane fade" id="tab22">
<?php
$x=1;
query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC');
if (have_posts()) : while (have_posts()) : the_post();
?>
<?php $xx=$x++ ?>
<div class="image-title">
<?php if(has_post_thumbnail()){
the_post_thumbnail();}
else{?>
<img src="<?php echo get_template_directory_uri(); ?>/assets/img/noimage.gif" width="100%" class="image"/>
<?php } ?>
<h4 class="heading-03"><a href="<?php the_permalink()?>"><?php the_title() ?></a></h4>
</div>
<?php
endwhile; endif;
wp_reset_query();
?>
</div>
</div>
</div>
<!-- Facebook Start -->
<?php if($jphostbd['facebook'] ==1 ): ?>
<div class="facebook_title"><?php echo $jphostbd['facebook-title']?></div>
<div class="fb-root">
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-page" data-href="<?php echo $jphostbd['facebook-link']['face-url']; ?>" data-tabs="timeline" data-width="<?php echo $jphostbd['facebook-width']?>" data-height="<?php echo $jphostbd['facebook-height']?>" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"></div>
<?php endif; ?>
<?php if($jphostbd['facebook'] == 2 ): ?>
<?php endif; ?>
</div>
<!-- ==========================-->
<div class="add"><?php dynamic_sidebar('single_sidebar_bottom')?></div>
</div>
</div>
</div>
</section>
<?php get_footer();
?>