<?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 M40i STEPTRONIC (2018)
R 589 900
Description
Mileage
114000 km
Year
Fuel Type
UNLEADED
Exterior Colour
PURE WHITE
Transmission
AUTOMATIC
VIN
Vehicle ID
28131975
Features
Range
X3
Mileage
114 000 km
Year
2018
Colour
PURE WHITE
Transmission
AUTOMATIC
Fuel
UNLEADED
Body Type
STATION WAGON
Doors
5
Service History
Vin No.
WBATS32030LE87022
Comments
<?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 589 900
MSRP
Back to search results

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_14.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_15.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_16.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_17.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_18.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_19.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_20.jpg
BMW
X3
(2021)
BMW xDRIVE20d M SPORT STEPTRONIC
R 529 900
87 000 km
2021
AUTOMATIC
DIESEL
Blue

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_14.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_15.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_16.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_17.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_18.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_19.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_20.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_21.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_22.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_23.jpg
BMW
X3
(2020)
BMW xDRIVE20d M SPORT STEPTRONIC
R 559 000
92 600 km
2020
AUTOMATIC
DIESEL
Phytonic Blue Metallic

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_12.jpg
BMW
X3
(2020)
BMW xDRIVE20d M SPORT STEPTRONIC
R 599 000
65 000 km
2020
AUTOMATIC
DIESEL
Glacier Silver Metallic

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114078_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_8.jpg
BMW
X3
(2021)
BMW MY21 20d MZANSI EDITION STEPTRONIC
R 619 900
73 650 km
2021
AUTOMATIC
DIESEL
Alpine White III

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_14.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_15.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_16.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_17.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_18.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_19.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01634_u0070816_20.jpg
USED
2021
87 000 km
AUTOMATIC
DIESEL
Blue
R 529 900

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_14.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_15.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_16.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_17.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_18.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_19.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_20.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_21.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_22.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114093_23.jpg
USED
2020
92 600 km
AUTOMATIC
DIESEL
Phytonic Blue Metallic
R 559 000

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/tol10163_u101688_12.jpg
USED
2020
65 000 km
AUTOMATIC
DIESEL
Glacier Silver Metallic
R 599 000

https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114078_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01609_u114002_8.jpg
USED
2021
73 650 km
AUTOMATIC
DIESEL
Alpine White III
R 619 900