<div class="blog_tablist <?php $categories = get_the_category();
                        $coutcates = count($categories)-1;
                        for ($j = 0; $j<=$coutcates; $j++) {
                            echo esc_html( $categories[$j]->slug )." ";
                        } ?> active">
                            <span class="b_date"><?php the_date(); ?></span>
                            <a href="<?php the_permalink(); ?>" class="title"><?php the_title(); ?></a>
                            <?php the_excerpt(); ?>
                            <ul class="blog_tag">
                                <li>
                                    <div class="media">
                                        <div class="media-left">
                                            <img src="<?= get_template_directory_uri(); ?>/img/b-man.png" alt=""/>
                                        </div>
                                        <div class="media-body">
                                            <span><?php echo get_the_author_meta('first_name').' '.get_the_author_meta('last_name');?></span>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="media">
                                        <div class="media-left">
                                            <img src="<?= get_template_directory_uri(); ?>/img/b-folder.png" alt=""/>
                                        </div>
                                        <div class="media-body">
                                    <span><?php
                                        $category_detail=get_the_category();//$post->ID
                                        foreach($category_detail as $cd){
                                            echo $cd->cat_name;
                                        }
                                        ?></span>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="media">
                                        <?php
                                        $tags = get_the_tags();
                                        if (!empty($tags)) : ?>
                                            <div class="media-left">
                                                <img src="<?= get_template_directory_uri(); ?>/img/b-tag.png" alt="tag-blue"/>
                                            </div>
                                            <div class="media-body">
                                        <span>
                                        <?php
                                        $tagsCount = 1;
                                        $numItems = count($tags);
                                        foreach ( $tags as $tag ) { $tagsCount++;
                                            $tag_link = get_tag_link( $tag->term_id ); ?>
                                            <?php echo $tag->name; ?><?php if($numItems != $tagsCount - 1) { echo ","; } ?>

                                            <?php
                                        }
                                        ?></span>
                                            </div>
                                        <?php endif; ?>
                                    </div>
                                </li>
                            </ul>
                        </div>