Hello. I`m trying to display a label with specific text for products that belong to two categories (Green and Oolong). All other categories will display the same text. I am having trouble getting this to work correctly.
<?php if ( in_category('Green') ) { ?>
<label><?php _e( 'Quantity - 150 G', 'yit' ) ?></label>
<?php } elseif ( in_category('Oolong') ) { ?>
<label><?php _e( 'Quantity - 150 G', 'yit' ) ?></label>
<?php } else { ?>
<label><?php _e( 'Quantity', 'yit' ) ?></label>
<?php } ?>
Any help would be appreciated.