cURL Error: 0 HEX
HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System: Linux fut001.vhost.ae 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User: akiadvo (1062)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/akiadvo/public_html/wp-content/themes/lawyer-by-osetin/content.php
<div <?php post_class('blog-index-item'); ?>>
<div class="blog-index-item-i">
  <?php 
  if(has_post_thumbnail()){
    $image_data = wp_get_attachment_image_src( get_post_thumbnail_id(  ), "full" );
    $proportion = 100;
    if($image_data && isset($image_data[1]) && isset($image_data[2]) && $image_data[1] > 0 && $image_data[2] > 0){
      $width = $image_data[1];
      $height = $image_data[2];
      $proportion = round($height / $width * 100);
    }
    // REMOVE NEXT LINE IF YOU NEED ORIGINAL PROPORTIONS
    $proportion = '70';
    ?>
    <div class="index-item-media-w"><div class="index-item-media" style="background-image: url('<?php the_post_thumbnail_url("full"); ?>'); padding-bottom: <?php echo esc_attr($proportion).'%'; ?>"></div></div>
    <?php
  }
  ?>
  <div class="index-item-content">
    <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
    <div class="blog-index-item-meta">
      <div class="blog-index-author-name"><span>By: </span><a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php the_author_meta( 'display_name' ); ?></a></div>
      <div class="blog-index-date-posted"><?php echo get_the_date('M j, Y'); ?></div>
    </div>
    <div class="blog-index-item-content"><?php echo osetin_excerpt(30, true); ?></div>
  </div>
</div>
</div>