Tagged: categories, remove, woocommerce
morning chaps,
I would be grateful for some of your much valued help/advice…
I am looking to remove commas (and a full stop) placed between categories that are displayed on a woocommerce single product page. Is this an enfold issue or a woocommerce issue? Does it need adapting in functions.php or in woocommerce template as i dont think it can be sorted with simple css (ie display:none)
Can you point me in the right direction please?
Many thanks
David
Hi curandero!
Via FTP, please go to wp-content/plugins/woocommerce/templates/single-product and open meta.php file and find
<?php echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $cat_count, 'woocommerce' ) . ' ', '.</span>' ); ?>
<?php echo $product->get_tags( ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', $tag_count, 'woocommerce' ) . ' ', '.</span>' ); ?>
and change it to
<?php echo $product->get_categories( ' ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $cat_count, 'woocommerce' ) . ' ', '</span>' ); ?>
<?php echo $product->get_tags( ' ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', $tag_count, 'woocommerce' ) . ' ', '</span>' ); ?>
Regards,
Yigit
Hi Yigit,
Thanks for that! works perfectly!
Appreciate your help,
David