<div class="iblogs-widget <?php echo $css_class; ?>">
  <?php if ($widget_heading) { ?>
    <h3 class="iblogs-line-title iblogs-widget-heading"><?php echo $widget_heading; ?></h3>
  <?php } ?>

  <ul class="iblogs-widget-post-list">
    <?php foreach ($posts_popular as $post) { ?>
    <li>
      <div class="iblogs-widget-post-image">
        <a href="<?php echo $post['url_more']; ?>">
          <img src="<?php echo $post['image']; ?>" alt="<?php echo $post['title']; ?>">
        </a>
      </div>
      <div class="iblogs-widget-post-details">
        <a href="<?php echo $post['url_more']; ?>">
          <h5 class="iblogs-widget-post-details-title"><?php echo $post['title']; ?></h5>
        </a>
        <p class="iblogs-widget-post-details-meta"><?php echo $post['publish']; ?></p>
      </div>
    </li>
    <?php } ?>
  </ul>

<?php if (!empty($custom_css)) { ?>
<style>
  <?php echo $custom_css; ?>
</style>
<?php } ?>
</div>
