| 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/loop/ |
Upload File : |
<?php /* Loop Name: Loop zigzag blog */ ?>
<?php
$counter = 1;
if (have_posts()) :
while (have_posts()) : the_post();
?>
<div id="post-<?php the_ID(); ?>" class="block col-md-12 ajax-post-wrapper" >
<div class="post list_post_content zigazg">
<div class="row"><div class="<?php if ($counter % 2 == 1){echo 'col-xs-12 col-sm-5 col-md-5 ';} else if ($counter % 2 == 0){echo 'col-xs-12 col-sm-5 col-md-5 col-sm-push-7 col-md-push-7';} ?>">
<?php if(has_post_thumbnail()) { ?>
<div class="thumb-container">
<?php
if(has_post_format('video')){
$embed = get_post_meta(get_the_ID(), 'novablog_video_embed', true);
$vimeo = strpos($embed, "vimeo");
$youtube = strpos($embed, "youtu");
if($youtube !== false){
$video_id = str_replace( 'http://', '', $embed );
$video_id = str_replace( 'https://', '', $video_id );
$video_id = str_replace( 'www.youtube.com/watch?v=', '', $video_id );
$video_id = str_replace( 'youtube.com/watch?v=', '', $video_id );
$video_id = str_replace( 'youtu.be/', '', $video_id );
$video_id = str_replace( '&feature=channel', '', $video_id );
$link = '//www.youtube.com/embed/'.esc_attr($video_id);
}
if($vimeo !== false){
//Get ID from video url
$video_id = str_replace( 'http://vimeo.com/', '', $embed );
$video_id = str_replace( 'http://www.vimeo.com/', '', $video_id );
$link = '//player.vimeo.com/video/'.esc_attr($video_id);
}
}
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full');
$img_width = novablog_getVariable('blog_zigzag_image_width') ? novablog_getVariable('blog_zigzag_image_width') : 470;
$img_height = novablog_getVariable('blog_zigzag_image_height') ? novablog_getVariable('blog_zigzag_image_height') : 490;
$img = aq_resize( $img_url, $img_width, $img_height, true, true, true );
?>
<figure class="featured-thumbnail thumbnail large">
<?php novablog_pinterest_share(); ?>
<?php if(has_post_format('video')){ ?>
<a class="popup-youtube" href="<?php echo esc_attr($link); ?>" title="<?php esc_attr(the_title()); ?>">
<?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>
<?php }else{ ?>
<a href="<?php esc_url(the_permalink()); ?>" title="<?php esc_attr(the_title()); ?>">
<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>
<?php } ?>
</figure></div>
<?php } ?>
</div>
<div class="<?php if ($counter % 2 == 1){echo 'col-xs-12 col-sm-7 col-md-7';} else if ($counter % 2 == 0){echo 'col-xs-12 col-sm-7 col-md-7 col-sm-pull-5 col-md-pull-5';} ?>">
<header class="post-header">
<?php novablog_post_category('',' '); ?>
<h2 class="list-post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="meta-space-top">
<?php if (novablog_getVariable('post_date')=='yes' or novablog_getVariable('post_date')=='') {novablog_post_meta(array('author', 'date', 'comments', 'reading_time', 'views'), false, 'meta-space-top');} ?>
</div>
<div class="isopad_grid">
<?php $post_excerpt = novablog_getVariable('post_excerpt'); ?>
<?php if ($post_excerpt=='yes') { ?>
<div class="excerpt">
<?php the_excerpt(); ?>
</div>
<?php } ?>
<?php $readmore_button = novablog_getVariable('readmore_button');
if ($readmore_button=='yes') { ?>
<div class="clear"></div><div class="viewpost-button"><a class="button" href="<?php esc_url(the_permalink()) ?>"><span><?php echo theme_locals("continue_reading"); ?></span></a></div>
<div class="clear"></div>
<?php } ?>
</div>
<div class="meta-line">
<?php get_template_part('post-template/comments-meta'); ?>
<?php get_template_part( 'post-template/share-buttons' ); ?>
<?php get_template_part('post-template/post-meta'); ?>
</div>
</header>
</div>
</div>
</div>
</div>
<?php $counter ++ ;
endwhile; else: ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>