Skip to main content
1 de 2

Al final lo resolví, así...

            <?php 
                $brands = wp_get_post_terms(get_the_ID(), 'pwb-brand' );
                $product_brands = wp_get_object_terms($post->ID, 'pwb-brand');

                        $slug = 'brand'; //default

                            if ( ! empty( $product_brands ) ) {
                             if ( ! is_wp_error( $product_brands ) ) {
                                     foreach( $product_brands as $brand ) {
                                    $slug = $brand->slug;
                                                                          }
                                                                     }
                                                            }


                foreach($brands as $brand){
                echo '<div class="tag-brands" style="color: #fe7418 !important;font-weight: 900;font-size: 15px;"><a href="'. $slug .'">' . $brand->name . '</a></div>';
                } 
            ?>