Answer the question
In order to leave comments, you need to log in
How to add video to category description and display woocomerce?
Hello gentlemen, for 2 days I have been suffering with the conclusion in the description of the product category of the video.
I decided to go this way, there is a code:
<?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>';
}
}
?>
Answer the question
In order to leave comments, you need to log in
Add to functions.phpadd_filter( 'term_description', 'do_shortcode' );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question