File: /home/rasad/domains/rasadeardakan.ir/private_html/wp-content/themes/ofogh/inc/carousel-4/4-3.php
<?php global $qaleb;?>
<?php if($qaleb['carousel-4-c']=='1'){?>
<section class="carousel-4" style="background:<?php echo $qaleb['carousel-4-c-c']; ?>;">
<div class="container">
<div class="tiitle">
<h3><?php echo $qaleb['carousel-4-c-title']; ?></h3>
</div>
<div class="carousel-four">
<div class="owl-carousel-4">
<?php
if($qaleb['carousel-4-c-content']=='1'){
$arggs = array(
'post_type' => 'post',
'posts_per_page' => $qaleb['carousel-4-c-count'],
);
}else if($qaleb['carousel-4-c-content']=='2'){
$arggs = array(
'post_type' => 'post',
'posts_per_page' => $qaleb['carousel-4-c-count'],
'orderby' => 'rand'
);
}else if($qaleb['carousel-4-c-content']=='3'){
$arggs = array(
'post_type' => 'post',
'posts_per_page' => $qaleb['carousel-4-c-count'],
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'term_id',
'terms' => $qaleb['carousel-4-c-type-select'],
),
),
);
}
query_posts($arggs);
if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="item caro">
<div class="thumb">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('medium'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
</div>
<div class="det">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="daat">
<?php if($qaleb['carousel-4-c-author']=='1'){?><li><i class="fa fa-user" aria-hidden="true"></i> <?php the_author_posts_link(); ?></li><?php } ?>
<?php if($qaleb['carousel-4-c-time']=='1'){?><li><i class="fa fa-clock" aria-hidden="true"></i> <?php the_time(' d F Y '); ?></li><?php } ?>
<?php if($qaleb['carousel-4-c-views']=='1'){?><li><i class="fa fa-signal" aria-hidden="true"></i> <?php echo getPostViews(get_the_ID()); ?></li><?php } ?>
<?php if($qaleb['carousel-4-c-comments']=='1'){?><li><i class="fa fa-comments" aria-hidden="true"></i> <?php comments_popup_link('0', '1 دیدگاه', '% دیدگاه'); ?></li><?php } ?>
</div>
</div>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
</div></div>
</div>
</section>
<div class="clearfix"></div>
<?php } ?>