Avatar of sharingsunshine
Flag for United States of America

asked on 

Need Help Placing Link On WooCommerce Products

I am using WooCommerce 3.5.6 and WordPress 5.0.3 on a local Xampp system.  I need to put some links at the top of each product page that relates to the digestive system and immune system category.  Here is a screenshot of one of the category names.


Here is my code

add_action( 'woocommerce_before_single_product_summary', 'thp_single_category', 11 );
function thp_single_category() {
if (is_product_category('Digestive System') ) {
	echo 'Something else';
echo '<a href="/digestive-process-sp-266">The Digestive Process</a>';
} elseif (is_product_category ('immune system')){
echo 'Something else';

Open in new window

Can anyone tell me why this isn't working?
Web Development* woo commercePHPWordPress

Avatar of undefined
Last Comment

8/22/2022 - Mon