How to display WooCommerce category information
-
Hi
Thanks very much for the plugin.
I am trying to add data from a field I’ve added to the WooCommerce categories onto archive-product.php but it doesn’t seem to be working.
This is the code I’m using:
<?php if (function_exists('wp_get_terms_meta')) { $MetaValue = wp_get_terms_meta($category_id, 'font-colour' ,true); } echo $metaValue; ?>
The category_id can’t be specific as it needs to work for all the categories that uses the archive-product.php page.
Do I need to add something to functions.php?
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to display WooCommerce category information’ is closed to new replies.