I’m working into points trying to get the kid model phrases for our product web page. Product manufacturers are setup like this beneath.
BRAND
MODEL
MODEL
MODEL
BRAND
MODEL
MODEL
ETC..
I’m attempting to show the kid mannequin that’s assigned to the product, however cant appear to get something to work. Right here is my present code that show’s the BRAND. Any strategies?
add_shortcode( 'show_keyfeatures_model', 'keyfeatures_model_shortcode' );
perform keyfeatures_model_shortcode() {
international $product;
$phrases = get_the_terms( get_the_ID(), 'product_brand' );
foreach ( $phrases as $time period ){
if ( 0 == $term->mum or dad ) {
$brand_name= $term->slug;
}
}
$output_html = '';
if ( ! empty($brand_name)) {
$output_html .= '<desk class="">';
if ( ! empty($brand_name) ) {
$output_html .= '<tr class="">
<td class=""><heart><b>' . $brand_name . '</b></heart></td>
</tr>';
}
$output_html .= '</desk>';
}
return $output_html;
}