• Resolved zombeeweb

    (@zombeeweb)


    Is there a way to have the brand description displayed somewhere on an archive?
    I cannot seem to find something relevant in your shortcodes area, neither can I find anything through dynamic fields with elementor pro.
    I wish to have an archive with all products of the selected brand, display the brand logo and the brand description.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    I put this shortcode in my functions.php, in order to add a new called
    [pwb-brand-description]

    Use as shortcode in Elementor.
    It shows the image after the text.

    function f_brand_shortcode_description(){
    	global $product;
    	if(!empty($product)){    
        		$id = $product->get_id();
    	}
    	if($id){  
        		$brands = wp_get_post_terms( $id, 'pwb-brand');
    		if( !is_wp_error($brands) && !empty($brands) ){
          			echo '<div class="pwb-brand-description-shortcode">';
          			foreach( $brands as $brand ){
    			echo $brand->description;
            		}
          		}
    
          		echo '</div>';
    	}
    }
    add_shortcode( 'pwb-brand-description', 'f_brand_shortcode_description');
    Plugin Author quadlayers

    (@quadlayers)

    thanks for sharing @elemilla

    Hello,
    I want to display brand description on single product.
    Tried putting code from above in functions, and embeding with WPBakery but no luck.
    Any help ?

    • This reply was modified 2 years, 3 months ago by hyperxdell.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display brand description’ is closed to new replies.