<?php
  $post_id = get_the_id();
// echo print_r(get_vehicle_gallery_images()); 
$image_urls = get_post_meta($post_id, 'pictures', true);

if (is_string($image_urls)) {
    $images = explode(',', $image_urls);
} elseif (is_array($image_urls)) {
    $images = $image_urls;
} else {
    $images = [];
}

if (!empty($images)): ?>
    <div class="vehicle-gallery">
        <?php foreach ($images as $index => $img_url): ?>
            <a href="<?php echo esc_url(trim($img_url)); ?>" class="glightbox" data-gallery="vehicle-gallery">
                <?php if ($index === 0): ?>
                    <img src="<?php echo esc_url(trim($img_url)); ?>" alt="Vehicle Image" class="gallery-main-image" />
                <?php else: ?>
                    <img src="<?php echo esc_url(trim($img_url)); ?>" alt="Gallery Thumb" class="gallery-thumb"  />
                <?php endif; ?>
            </a>
        <?php endforeach; ?>
    </div>
<?php endif; ?>

document.addEventListener('DOMContentLoaded', function () {
    new Swiper('.vehicle-gallery', {
        slidesPerView: 5,
        spaceBetween: 10,
        loop: true,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        breakpoints: {
            768: {
                slidesPerView: 3,
            },
            480: {
                slidesPerView: 2,
            }
        }
    });
});
e-tron

AUDI GT MY22 RS

R 1 499 950
Range:
e-tron
Year:
2022
Mileage:
11127
Colour:
DAYTONA GRAY PEARLESCENT
Transmission:
AUTOMATIC
Fuel:
ELECTRIC
Vehicle ID:
29114184
Vin No.:
WAUZZZFW5N7900997
Description

Unleash Performance and Luxury with this Exceptional Audi

Experience the thrill of driving with this meticulously inspected vehicle, embodying the very essence of Vorsprung. With an extended Audi Freeway Plan valid until 24 November 2029 or 100 000 kilometres, peace of mind comes standard. Test drives are welcome, and in-house finance facilities ensure a seamless purchasing experience.

This stunning model features the Black Styling Package Plus and a striking Carbon Roof, complemented by Gloss Carbon Styling Inlays. Safety and comfort are paramount, with Active Lane Assist, Audi Pre Sense Front, and front sports seats with ventilation and a massage function. The RS Design Package in Red adds a dynamic touch, while Adaptive Cruise Control and 21″ Alloy Wheels enhance driving pleasure.

Mileage is recorded at the time of advertising and may vary.

Key highlights:
– Extended Audi Freeway Plan until 24 November 2029 or 100 000 kilometres
– Black Styling Package Plus and Carbon Roof
– Active Lane Assist with Emergency Assist
– Audi Pre Sense Front for enhanced safety
– Sports seats with ventilation and massage function
– RS Design Package in Red for a striking look
– Adaptive Cruise Control for effortless driving
– 21″ Alloy Wheels for a bold stance

Choose NMI for reliability and excellence in every drive. Experience unmatched luxury today.

Audi Century City
<?php
  $post_id = get_the_id();

   $custom_fields = get_post_meta($post_id);
echo $custom_fields['mmcode'][0] . '<br />';
  echo print_r($custom_fields);
    if (empty($custom_fields)) {
        error_log("No custom fields found for post ID: $post_id");
        return;
    }

    error_log("Custom fields for post ID $post_id:");

    foreach ($custom_fields as $key => $value) {
        // $value is always an array
        if (is_array($value)) {
            foreach ($value as $val) {
                error_log("$key => $val");
            }
        } else {
            error_log("$key => $value");
        }
    }
?>
TOL10167
29114184
Pre-owned Enquiry - Satellite