• Resolved jh

    (@jethrohazelhurst)


    I am trying to display the brand description and brand logo on each product page. To get the brand description I am using this:

    $brands = wp_get_object_terms(get_the_ID(), 'pwb-brand');
     var_dump($brands);

    I can access the brand description using $brands->description

    How do I get the URL to the brand logo?

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi jethrohazelhurst.

    Try something like this:

    
    $attachment_id = get_term_meta( $brand->term_id, 'pwb_brand_image', true );
    $attachment_src = wp_get_attachment_image_src( $attachment_id,'full' );
    

    ??

    Thread Starter jh

    (@jethrohazelhurst)

    Hi titodevera! Just want to say thank you so much for getting back to me with this perfect solution, really I can’t express how much easier this has made everything. What a fantastic plugin, I will be sure to leave very positive reviews! If there was a paid version I would gladly buy. Thanks again!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP: How Do I Get The Brand Logo Link?’ is closed to new replies.