term_id; $term_name = $term->name; } else { $term_id = $term; $term_obj = get_term($term_id, 'product_cat'); $term_name = $term_obj ? $term_obj->name : ''; } $thumbnail_id = get_term_meta($term_id, 'thumbnail_id', true); $image_url = wp_get_attachment_url($thumbnail_id); ?>
<?php echo esc_attr($term_name); ?>

No categories selected.

Banner 1 Banner 2
'product', 'posts_per_page' => 4, 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => 'discover_me', // <-- Your category slug ), ), ); $query = new WP_Query($args); ?>
have_posts()) : ?> have_posts()) : $query->the_post(); global $product; ?>
No Image

get_price_html(); ?>

No products found in this category.

Banner 1
'product', 'posts_per_page' => 4, 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => 'top_picks', ), ), ); $query = new WP_Query($args); ?>

have_posts()) : ?> have_posts()) : $query->the_post(); global $product; ?>
No Image

get_price_html(); ?>

No products found in this category.

'testimonial', 'posts_per_page' => 4, )); if ($testimonials->have_posts()) : while ($testimonials->have_posts()) : $testimonials->the_post(); $testimonial_content = get_field('testimonial_content'); $rating = $testimonial_content['rating'] ?? 5; $image_url = get_the_post_thumbnail_url(get_the_ID(), 'medium'); // get featured image ?>
<?php the_title_attribute(); ?>

-