<?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,
}
}
});
});
Pre-Owned
BMW 320d M SPORT STEPTRONIC (2021)
R 499 000
Description
Mineral Grey Metallic *Leather Vernasca Black *19" M Double spoke *Trailer tow hitch *Glass Sunroof *Ambient interior lighting *Parking Assist *Connected Package Plus *Smartphone Integration *Live Cockpit Plus *M Sport Launch Edition
Mileage
108500 km
Year
Fuel Type
DIESEL
Exterior Colour
Mineral Grey Metallic
Transmission
AUTOMATIC
VIN
Vehicle ID
28481309
Features
Range
3 SERIES
Mileage
108 500 km
Year
2021
Colour
Mineral Grey Metallic
Transmission
AUTOMATIC
Fuel
DIESEL
Body Type
SEDAN
Doors
4
Service History
Full
Vin No.
WBA5V52020FJ88368
Comments
Mineral Grey Metallic *Leather Vernasca Black *19" M Double spoke *Trailer tow hitch *Glass Sunroof *Ambient interior lighting *Parking Assist *Connected Package Plus *Smartphone Integration *Live Cockpit Plus *M Sport Launch Edition
<?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");
}
}
?>Back to search results
R 499 000
MSRP
Call Now
Available from BMW Centurion
2023 Lenchen Ave S, Centurion Central, Centurion, 0157, South Africa
Back to search results
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_14.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_15.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_16.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114132_17.jpg
USED
2019
89 543 km
AUTOMATIC
UNLEADED
White
R 479 900
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103782_10.jpg
USED
2023
29 000 km
AUTOMATIC
UNLEADED
Alpine White III
R 639 000
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_14.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_15.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_16.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_17.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_18.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_19.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_20.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_21.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_22.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_23.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_24.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_25.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_26.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_27.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10000_u25485_28.jpg
USED
2021
37 000 km
AUTOMATIC
UNLEADED
White
R 639 950
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u103774_10.jpg
USED
2023
29 000 km
AUTOMATIC
UNLEADED
Portimao Blue Metallic
R 649 000

