<?php
/**
* Template part for displaying post meta
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package arsha
*/
$categories = get_the_terms( $post->ID, 'category' );
$arsha_blog_date = get_theme_mod( 'arsha_blog_date', true );
$arsha_blog_comments = get_theme_mod( 'arsha_blog_comments', true );
$arsha_blog_author = get_theme_mod( 'arsha_blog_author', true );
$arsha_blog_cat = get_theme_mod( 'arsha_blog_cat', false );
?>
<div class="mt-postbox-meta mb-15">
<?php if ( !empty($arsha_blog_author) ): ?>
<span><a href="<?php print esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );?>"><i
class="fal fa-user"></i> <?php print get_the_author();?></a></span>
<?php endif;?>
<?php if ( !empty($arsha_blog_date) ): ?>
<span><a href="#"><i class="fal fa-calendar-alt"></i> <?php the_time( get_option('date_format') ); ?></a></span>
<?php endif;?>
<?php if ( !empty($arsha_blog_cat) ): ?>
<?php if ( !empty( $categories[0]->name ) ): ?>
<span><a href="<?php print esc_url(get_category_link($categories[0]->term_id)); ?>"><i
class="fal fa-certificate"></i> <?php echo esc_html($categories[0]->name); ?></a></span>
<?php endif;?>
<?php endif;?>
<?php if ( !empty($arsha_blog_comments) ): ?>
<span><a href="<?php comments_link();?>"><i class="fal fa-comments"></i> <?php comments_number();?></a></span>
<?php endif;?>
</div>