wordpress-theme / category-rooms.php
category-rooms.php
Raw
<?php get_header(); ?>
<h1 class='room-heading'>Available Rooms </h1>
<div class="allrooms-section">
<?php 
    if ( have_posts() ) {
        while ( have_posts() ) {
            the_post(); 
            ?>
            <article >
                <?php  
                    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
                        $thumbnail_url = get_the_post_thumbnail_url('', 'post-thumbnails');  
                        ?>
                         <div class="article-img-wrapper">
                        <img alt="'" class="newsImg" src='<?php echo $thumbnail_url; ?>'>
                        </div>   
                        <?php
                    } 
                ?>
               
                <div class="heading2"><?php the_title(); ?> </div>

                <br> <br> 
                <a href= "<?php the_permalink(); ?>" >
                    <span class="btn-details"> Details </span></a>
              
            </article>
            <?php
        } 
    }    
        ?>
</div>
<?php get_footer(); ?>