<?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,
}
}
});
});
FORD 2.0 SiT D CAB XLT 4X2 6AT
R 609 949
Range:
RANGER
Year:
2025
Mileage:
10 500 km
Colour:
ICONIC SILVER
Transmission:
AUTOMATIC
Fuel:
DIESEL
Vehicle ID:
28801791
Available from NMI Ford Pinetown
<?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");
}
}
?>Similar Listings
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071113_12.jpg
FORD
RANGER
(2021)
FORD 2.2 TDCI XL 4X2 D CAB
<?php $post_id = get_the_id(); $post_meta = get_post_meta($post_id); echo print_r($post_meta); ?>
AFAPXXMJ2PMD56441
AFAPXXMJ2PMD56441
Colour: RED
MOL01630
28801786
28801786
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");
}
}
?>
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071057_13.jpg
FORD
RANGER
(2022)
FORD 2.0 BIT 4X2 D CAB WILDTRAK AT
<?php $post_id = get_the_id(); $post_meta = get_post_meta($post_id); echo print_r($post_meta); ?>
AFAPXXMJ2PNY78521
AFAPXXMJ2PNY78521
Colour: Orange
MOL01630
28803284
28803284
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");
}
}
?>
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0071125_12.jpg
FORD
RANGER
(2025)
FORD 2.0 SiT XL X CAB AT 4X2
<?php $post_id = get_the_id(); $post_meta = get_post_meta($post_id); echo print_r($post_meta); ?>
AFAGXXMJ2GSA71693
AFAGXXMJ2GSA71693
Colour: FROZEN WHITE
MOL01630
28801788
28801788
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");
}
}
?>
https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_1.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_2.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_3.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_4.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_5.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_6.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_7.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_8.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_9.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_10.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_11.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_12.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_13.jpg, https://bmrprodphotosuitestorage.blob.core.windows.net/stockimages/mol01630_u0070952_14.jpg
FORD
RANGER
(2025)
FORD 2.0 SiT D CAB XL 4X4
<?php $post_id = get_the_id(); $post_meta = get_post_meta($post_id); echo print_r($post_meta); ?>
AFAPXXMJ2PSU15547
AFAPXXMJ2PSU15547
Colour: CARBONIZED GREY
MOL01630
28803124
28803124
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");
}
}
?>
