<?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,
            }
        }
    });
});

MERCEDES 300d

R 899 890
Range:
GLE
Year:
2021
Mileage:
136 093 km
Colour:
WHITE
Transmission:
AUTOMATIC
Fuel:
DIESEL
Vehicle ID:
29294493

Elevate Your Driving Experience

This used luxury SUV combines performance with elegance. It offers a smooth ride, spacious interior, and advanced technology, making every journey enjoyable. With its commanding presence and sophisticated design, this vehicle stands out in any setting.

Inside, you’ll find premium materials and an intuitive layout. Safety features enhance your peace of mind, ensuring a secure driving experience. This vehicle is ready for both city commutes and adventurous getaways, providing versatility for any lifestyle.

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

Key highlights:
– Spacious and refined interior
– Advanced safety features
– Smooth and powerful performance
– Elegant exterior design
– Versatile for various driving needs
– Comfortable seating for all passengers
– Intuitive technology integration

Trust in NMI for quality and reliability. Experience this exceptional vehicle today.

Available from NMI Ford Pietermaritzburg
<?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");
        }
    }
?>
Sales Enquiry - Pre-Owned Forms

Similar Listings 

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071299_13.jpg
MERCEDES
GLE
(2017)

MERCEDES 350 d GUARD 4MATIC 9G-TRONIC

<?php
  
   $post_id = get_the_id();
$post_meta = get_post_meta($post_id);
  echo print_r($post_meta);
  ?>
WDC1660242A986903
WDC1660242A986903
Colour: WHITE
MOL01630
29296037

Enquire

Contact Form
<?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");
        }
    }
?>
R 429 949
155405km
2017
AUTOMATICMANUAL
More details