<?php

/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package ultimate_hotel_booking
 */

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php ultimate_hotel_booking_post_thumbnail(); ?>
    <header class="entry-header">
        <?php
		if (is_singular()) :


			the_title('<h1 class="entry-title">', '</h1>');

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

    <div class="entry-content">
        <?php
		$ultimate_hotel_booking_post_content = get_the_content(
			sprintf(
				wp_kses(
					/* translators: %s: Name of current post. Only visible to screen readers */
					esc_html__('Continue reading<span class="screen-reader-text"> "%s"</span>', 'ultimate-hotel-booking'),
					array(
						'span' => array(
							'class' => array(),
						),
					)
				),
				wp_kses_post(get_the_title())
			)
		);
		if (!is_single()) {
			$ultimate_hotel_booking_trimmed_content = wp_trim_words($ultimate_hotel_booking_post_content, 40, '<a href="' . get_permalink() . '"> ...[ read more ]</a>');
			echo '<p>' . wp_kses_post( $ultimate_hotel_booking_trimmed_content ) . '</p>';
		} else {
			echo '<p>' . wp_kses_post( $ultimate_hotel_booking_post_content ) . '</p>';
		}
		wp_link_pages(
			array(
				'before' => '<div class="page-links">' . esc_html__('Pages:', 'ultimate-hotel-booking'),
				'after' => '</div>',
			)
		);
		?>
    </div><!-- .entry-content -->

    <footer class="entry-footer">
        <div class="ultimate-hotel-booking-entry-footer-meta-outter tft-flex ultimate-hotel-booking-f-sb">
            <div class="entry-footer-meta tft-flex ultimate-hotel-booking-f-cg-20">
                <div class="ultimate-hotel-booking-entry-footer-meta">
                    <?php if ('post' === get_post_type()) : ?>
                    <div class="entry-meta">
                        <i class="fas fa-calendar-alt"></i>
                        <?php ultimate_hotel_booking_posted_on();
							ultimate_hotel_booking_posted_by(); ?>
                    </div><!-- .entry-meta -->
                    <?php endif; ?>
                </div>
                <div class="ultimate-hotel-booking-entry-footer-meta">
                    <i class="far fa-comment"></i> <?php //ultimate_hotel_booking_entry_footer(); ?>
					<a href="<?php comments_link(); ?>"><?php comments_number( 'Leave a Comment', '1 Comment', '% Comments' ); ?></a>
                </div>
            </div>
        </div>
    </footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->