Mr. W
(@gabriel-winnberg)
Please have a look at my previous post, I just did that.
Gabriel – I would love this shortcode! I’m afraid I can’t find your previous post where you have done this, please would you mind posting the short code again, or a link to the original post. Thanks so much!
Hi!
1) Add this code to your functions.php for create the shortcode:
function custom_pwb_brand_info() {
if( is_product() ){
$brands = wp_get_post_terms( get_the_ID(), 'pwb-brand' );
foreach( $brands as $brand ) {
echo '<p>'.$brand->description.'</p>';
}
}
}
add_shortcode( 'custom_pwb_brand_info', 'custom_pwb_brand_info' );
2) Install a plugin for adding custom tabs. I suggest you YIKES Custom Product Tabs
3) Add the shortcode [custom_pwb_brand_info] to your custom tab
😉
-
This reply was modified 8 years, 10 months ago by
titodevera.
-
This reply was modified 8 years, 10 months ago by
titodevera.
many many thanks for your reply titodevera! Much appreciated.
You’re welcome! Don’t forget to leave a review if you like the plugin 😉
The shortcode doesn’t work after the new update!