Searched high and low with no resolution. Seems its been awhile since it’s been asked so maybe there is a solution now.
How can I get the description for an attribute’s term to show when selected?(a variation that has been selected on the product page – in my case I would like to show the description for the scent that has been selected from the dropdown).
I did find this code and inserted it into the variable.php file:
<?php $my_taxonomy = ‘pa_scents’;
$terms = wp_get_post_terms( $post->ID, $my_taxonomy );
echo term_description($terms->term_id, $my_taxonomy); ?>
It is the closest I’ve come but will only return the description for the first item in the terms list, no matter what is chosen.
I tried radio buttons but that took up too much room.
Thank you so very much! (I am using Whitelight if that matters)
- The topic ‘How to show selected Attribute Term Description on Product Page?’ is closed to new replies.