Diagnostic Products
High-sensitivity rapid test kits and molecular diagnostic solutions for veterinary professionals and farms.
‘product’,
‘posts_per_page’ => 6,
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
‘post_status’ => ‘publish’,
);
$products_query = new WP_Query($args);
?>
have_posts()) : ?>
// Field Retrieval
$model_number = get_field(‘model_number’);
$assay_time = get_field(‘assay_time’);
$sample_type = get_field(‘sample_type’); // Select field
// Image Handling: Native Thumbnail -> ACF Field -> Placeholder
$thumb_id = get_post_thumbnail_id();
$acf_image = get_field(‘featured_image’);
$img_html = ”;
if ($thumb_id) {
$img_html = wp_get_attachment_image($thumb_id, ‘medium_large’, false, [
‘class’ => ‘w-full h-full object-cover group-hover:scale-105 transition-transform duration-700’,
‘loading’ => ‘lazy’
]);
} elseif ($acf_image) {
// Handle ACF Image (ID or Array)
if (is_array($acf_image) && isset($acf_image[‘url’])) {
$img_html = ‘‘;
} elseif (is_numeric($acf_image)) {
$img_html = wp_get_attachment_image($acf_image, ‘medium_large’, false, [
‘class’ => ‘w-full h-full object-cover group-hover:scale-105 transition-transform duration-700’,
‘loading’ => ‘lazy’
]);
}
} else {
// Fallback Placeholder
$img_html = ‘‘;
}
?>