<?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,
}
}
});
});
Volkswagen POLO VIVO 1.4 TRENDLINE (5DR)
R 174 900
Range:
Polo Vivo
Year:
2022
Mileage:
130 320 km
Colour:
WHITE
Transmission:
Manual
Fuel:
petrol
Vehicle ID:
2484
Available from NMI Toyota Middelburg
Call Now
Available from Middelburg
NMI Toyota Middelburg, 31 Dolerite Cres, Middelburg, 1050, South Africa
Similar Listings
https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_1_full.jpg?v=20261003085244, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_2_full.jpg?v=20261003085246, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_3_full.jpg?v=20261003085248, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_4_full.jpg?v=20261003085250, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_5_full.jpg?v=20261003085252, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_6_full.jpg?v=20261003085255, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_7_full.jpg?v=20261003085257, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_8_full.jpg?v=20261003085259, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_9_full.jpg?v=20261003085300, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_10_full.jpg?v=20261003085302, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_11_full.jpg?v=20261003085304, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_12_full.jpg?v=20261003085306, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_13_full.jpg?v=20261003085308, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_14_full.jpg?v=20261003085310, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_15_full.jpg?v=20261003085312, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_16_full.jpg?v=20261003085314, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_17_full.jpg?v=20261003085316, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_18_full.jpg?v=20261003085317, https://ststockprodsanorth001.blob.core.windows.net/stock-images/AAVZZZ6RZPU008767_19_full.jpg?v=20261003085319
Volkswagen
Polo Vivo
(2023)
Volkswagen POLO VIVO 1.4 COMFORTLINE (5DR)
<?php $post_id = get_the_id(); $post_meta = get_post_meta($post_id); echo print_r($post_meta); ?>
AAVZZZ6RZPU008767
AAVZZZ6RZPU008767
Colour: SILVER
MOL01644
7936
7936
Enquire
<?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");
}
}
?>








