This is where I am going blind down an alley, with no idea where any door is.
So I found a function that should extract brand name, but I think it is more for other parts of the site, but it's a start.
// add brand to archive pages
function bbloomer_show_woocommerce_brands_loop($productBrandTerm) {
$productBrandTerm = wp_get_post_terms( $post->id, 'product_brand', array("fields" => "name"));
print_r($post->id);
echo '<div>here'.$productBrandName.'</div>';
}
add_action( 'woocommerce_after_shop_loop_item_title', 'bbloomer_show_woocommerce_brands_loop', 8 );
I assumed this would gather the product_brand from the array, based on the $post->id in the loop.
Then it would echo that on screen after the title. It does echo 'here'. So the function isn't producing a fatal error.
My issue is I never know how to:
a) find the term within the database and then;
b) how to say 'select term from db where postid = $postid'.
It's not like a mysql query is it, but I REALLY want to learn it. I don't really want someone to just paste in the answer. I want to know that means that, this bit relates to this part of the database, and that renders that.