Add booknow button to 'rooms' pages
authorLaury GvR <laury@gaslightmedia.com>
Thu, 18 Apr 2019 23:41:32 +0000 (19:41 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 18 Apr 2019 23:41:32 +0000 (19:41 -0400)
parts/main-content.php
sections/rooms-content.php

index e6b944a..fb841ce 100644 (file)
@@ -1,4 +1,3 @@
-
             <?php
                 $pages_with_booknow = [
                     86, // Rooms & Suites
index d65e395..9716c66 100644 (file)
@@ -9,6 +9,25 @@ global $post;
 ?>
  <div class="mid-content rooms-content">
        <div id="primary" class="content-area">
+
+        <?php
+            $pages_with_booknow = [
+                86, // Rooms & Suites
+                90, // Amenities
+                92, // Packages & Offers
+                94, // Weddings
+                98, // Meeting Venues
+                100,// Group Activities
+                116 // Swim & Fitness
+            ];
+            if ( in_array( get_the_id(), $pages_with_booknow ) ) {
+                ?>
+                    <div class="booknow-button-container">
+                        <a class="booknow-button" href="<?php echo get_permalink(1384); ?>">Book Now</a>
+                    </div>
+                <?php 
+            }
+        ?>
                <main id="main" class="site-main">
             <?php echo "<h1 class='rooms-page-title'> $post->post_title </h1>"; ?>
             <div class="interior-page-content">