| Server IP : 213.186.33.4 / Your IP : 216.73.216.222 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/themes/novablog/post-template/ |
Upload File : |
<?php
$post_type = 'post';
$rtl_slide = '';
$random_ID = uniqid();
$number_of_posts = 8;
$items_desktop = 4;
$items_tablet = 3;
$items_mobile = 2;
$margin = 30;
$autoplay = 'true';
$auto_play_timeout = 5000;
$display_navs = 'false';
$display_pagination = 'true';
$args = array(
'ignore_sticky_posts' => 1,
'posts_per_page' => 8,
'post_type' => 'post',
'orderby' => 'meta_value_num',
'meta_key' => 'views',
'order' => 'DESC'
);
$trending = new WP_Query( $args ); ?>
<div class="row">
<div class="col-md-12">
<div class="trending-posts">
<h6 class="trending-title"><span><?php esc_html_e('TRENDING THIS WEEK','novablog');?></span></h6>
<div class="carousel-wrap slideshow">
<?php
echo '<div id="owl-carousel-' . esc_attr($random_ID) . '" class="owl-carousel-' . esc_attr($post_type) . ' owl-carousel" data-center="false" data-howmany="' .esc_attr($number_of_posts). '" data-margin="' . esc_attr($margin) . '" data-items="' . esc_attr($items_desktop) . '" data-tablet="' . esc_attr($items_tablet) . '" data-mobile="' . esc_attr($items_mobile) . '" data-auto-play="' . esc_attr($autoplay) . '" data-auto-play-timeout="' . esc_attr($auto_play_timeout) . '" data-nav="' . esc_attr($display_navs) . '" data-rtl="'.esc_attr($rtl_slide).'" data-pagination="' . esc_attr($display_pagination) . '">';
?>
<?php while ( $trending->have_posts() ) : $trending->the_post();
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url($thumb,'novablog-standard-large');
$img_width = 270;
$img_height = 370;
$img = aq_resize( $img_url, $img_width, $img_height, true, true, true );
?>
<div class="owl-slide post-list_h">
<?php if ( has_post_thumbnail() ) { ?>
<div class="trending-default">
<a href="<?php esc_url(the_permalink()); ?>" title="<?php esc_attr(the_title()); ?>" class="hercules-related-default-link">
<?php if(has_post_format('video')){
echo '<div class="cover-video"></div>';
} ?>
<img src="<?php echo esc_url($img); ?>" width="<?php echo esc_attr($img_width); ?>" height="<?php echo esc_attr($img_height); ?>" alt="<?php esc_attr(the_title());?>" />
</a>
</div>
<?php } ?>
<div class="post-list-inner">
<?php novablog_post_category(); ?>
<h6><?php the_title(); ?></h6>
<?php novablog_post_meta(array('date', 'views'), false, 'meta-space-top'); ?>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); ?>
</div>
</div></div>