<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package blog-vlog
 */

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="blog_vlog-post-wrapper">
            <?php
                $content = apply_filters( 'the_content', get_the_content() );
                $video = false;

                # Only get video from the content if a playlist isn't present.
                if ( false === strpos( $content, 'wp-playlist-script' ) ) {
                    $video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
                }
            ?>
       <!--post thumbnal options-->
        <div class="blog_vlog-post-thumb post-thumb">
            <?php 
                if ( ! empty( $video ) ) {
                    foreach ( $video as $video_html ) {
                        echo '<div class="blog-vlog-video-section">';
                        echo $video_html;
                        echo '</div>';
                    }
                }
            ?>
        </div><!-- .post-thumb-->
        <div class="content-wrap">
            <div  class="header-part">
                <div class="catagories">
                    <?php blog_vlog_entry_footer(); ?>
                </div>

                <div class="entry-header">
                    <?php
                    if ( is_single() ) :
                        the_title( '<h1 class="entry-title">', '</h1>' );
                    else :
                        the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
                    endif; ?>


                    <div class=post-date">
                        <?php
                        if ( 'post' === get_post_type() ) : ?>
                            <div class="entry-meta">
                                <?php blog_vlog_posted_on(); ?>
                            </div><!-- .entry-meta -->
                            <?php
                        endif; ?>
                    </div>




                </div><!-- .entry-header -->
            </div>

            <div class="entry-content">
                <?php the_excerpt(); ?>

                <div class="more-area">
                    <a href="<?php the_permalink(); ?>">
                        <?php _e('Read More ','blog-vlog') ?> <i class="fa fa-angle-double-right"></i></a>
                </div>

            </div><!-- .entry-content -->
        </div>
    </div>
</article><!-- #post-## -->
