Created
May 14, 2015 15:02
-
-
Save hslaszlo/d0c6357a76d7da56c7cd to your computer and use it in GitHub Desktop.
Display Woocommerce category description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$args = array( 'taxonomy' => 'product_cat',); | |
$terms = wp_get_post_terms($post->ID,'product_cat', $args); | |
$count = count($terms); | |
if ($count > 0) { | |
foreach ($terms as $term) { | |
echo '<div style="direction:rtl;">'; | |
echo $term->description; | |
echo '</div>'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment