<?php
/**
 * @package webhosty
 */
global $post;
$comments_count = wp_count_comments($post->ID);
$thumb_w = '848';
$thumb_h = '389'; 
	echo'<article class="article clearfix">';?>
		<ul class="list-n"><?php
			webhosty_posted_on(); 
			echo '<li class="avtor">'.esc_attr(get_the_author()).'</li> 
			<li class="b">'.esc_attr($comments_count->approved).'</li>
		     </ul>';
		if (has_post_thumbnail($post->ID))    
		{
			$thumb = get_post_thumbnail_id($post->ID);  
			$attachment_url = wp_get_attachment_url($thumb, 'full');
			$image = aq_resize($attachment_url, $thumb_w, $thumb_h, true);
			echo '<a class="post-img" href="'.esc_url(get_permalink($post->ID)).'">
			<img src="'.esc_url($image).'" alt="post-img">
			</a>';  
		}							
		echo'<div class="post-content clearfix">
			<h2 class="post-title">';
			echo '<a href="'.esc_url( get_permalink($post->ID) ).'">'.esc_attr(get_the_title($post->ID)).'</a>
			</h2>
			<p class="post-text">'.esc_attr(get_excerpt(200)).'</p>
			<a class="button btn-learn" href="'.esc_url( get_permalink($post->ID) ).'">'.__('learn more','webhosty').'</a>
		</div>
	</article>';			   
?>