I have included the tag cloud widget as an element within my blog posts. Is it possible to have the tag cloud only display relevant tags/tags assigned to the given post?
Thanks!
I have included the tag cloud widget as an element within my blog posts. Is it possible to have the tag cloud only display relevant tags/tags assigned to the given post?
Thanks!
Shan404
On
You can create and use a Shortcode
function my_tags_shortcode( $atts ) {
global $product;
echo wc_get_product_tag_list( $product->get_id(), ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', count( $product->get_tag_ids() ), 'woocommerce' ) . ' ', '</span>' );
}
add_shortcode( 'my_tags_shortcode', 'my_tags_shortcode');
Then you can use the shorcode [my_tags_shortcode] anywhere in posts or pages.
Instead of using the tag cloud widget, I would recommend editing your single.php (prefereably in a child theme) to include post tags meta. You can use something similar to this:
It may differ depending on your theme.