//file name
single.(postname).php
<?php get_header();
// $add_tours = get_field('add_tours');
$tour_imformation = get_field('tour_information');
$destination_names = $tour_imformation['destination_name'];
$hotel_names = $tour_imformation['featured_hotels'];
?>
<main class="single-destination">
<!-- ========================= Banner ========================== -->
<div class="banner" style="background-image: url(<?php the_post_thumbnail_url() ?>);">
<div class="title">
<h1><?php the_title(); ?></h1>
</div>
</div>
<!-- ============================ grid sec =========================== -->
<section class="grid-sec">
<div class="wrapper-container">
<div class="wrapper">
<div class="wapper-item">
<div class="tab-sec">
<div class="tabs">
<ul id="tabs-nav">
<li><a href="#tab1">INFORMATION</a></li>
<li><a href="#tab2">TOUR PLAN</a></li>
<li><a href="#tab3">LOCATION</a></li>
<li><a href="#tab4">GALLERY</a></li>
<li><a href="#tab5">REVIEWS</a></li>
</ul> <!-- END tabs-nav -->
<div id="tabs-content">
<div id="tab1" class="tab-content">
<div class="tab-data">
<h2>INFORMATION</h2>
<p><?php the_content(); ?></p>
<ul>
<li>
<ul>
<li><strong>Destination</strong></li>
<li>
<ul>
<?php
foreach ($destination_names as $key => $value) {
$destination_cat_names = get_the_category_by_ID($value);
$destination_cat_url = get_category_link($value);
?>
<li>
<i class="fa-solid fa-map-location"></i><a href="<?php echo $destination_cat_url; ?>" title="<?php echo $destination_cat_names; ?>"><?php echo $destination_cat_names; ?></a>
</li>
<?php }
?>
</ul>
</li>
</ul>
</li>
<li>
<ul>
<li><strong>Includes</strong></li>
<li><?php echo $tour_imformation['include']; ?></li>
</ul>
</li>
<li>
<ul>
<li><strong>Excludes</strong></li>
<li><?php echo $tour_imformation['excludes']; ?></li>
</ul>
</li>
<li>
<ul>
<li><strong>Featured Hotels</strong></li>
<li>
<ul>
<?php
foreach ($hotel_names as $key => $value) { ?>
<li>
<i class="fa-solid fa-hotel"></i><a href="<?php the_permalink($value); ?>" title="<?php the_title_attribute($value); ?>"><?php echo get_the_title($value); ?></a>
</li>
<?php }
?>
</ul>
</li>
</ul>
</li>
</ul>
<?php echo do_shortcode('[gravityform id="1" title="false" description="false" ajax="true"]') ?>
</div>
</div>
<div id="tab2" class="tab-content">
<div class="tour-plan-data">
<ul>
<li>
<h2>Itinerary Details</h2>
<p>A detailed itinerary will be distributed 45 days prior to departure date. Please use the trip highlights in the interim.</p>
</li>
</ul>
</div>
</div>
<div id="tab3" class="tab-content">
<div class="location-data">
<h2>LOCATION</h2>
<div class="map">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d210702.826143149!2d150.47390740491318!3d-34.39545731740385!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6b130871b4cadc43%3A0x238c1ad4d5e9ac69!2sUpper%20Nepean%2C%20New%20South%20Wales%2C%20Australia!5e0!3m2!1sen!2s!4v1667428646506!5m2!1sen!2s" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
</div>
</div>
<div id="tab4" class="tab-content">
<div class="gallery-data">
<ul>
<li><a href="" class="fancybox"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/01.jpg" alt=""></a></li>
<li><a href="" class="fancybox"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/02.jpg" alt=""></a></li>
<li><a href="" class="fancybox"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/03.jpg" alt=""></a></li>
<li><a href="" class="fancybox"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/04.jpg" alt=""></a></li>
<li><a href="" class="fancybox"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/05.jpg" alt=""></a></li>
<li><a href="" class="fancybox"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/06.jpg" alt=""></a></li>
</ul>
</div>
</div>
<div id="tab5" class="tab-content">
<?php echo do_shortcode('[gravityform id="2" title="false" description="false"]') ?>
</div>
</div> <!-- END tabs-content -->
</div> <!-- END tabs -->
</div>
</div>
</div>
</div>
</section>
</main>
<?php get_footer();
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter