cagartner
7/18/2016 - 3:13 AM

WooCommerce - Custom tag cloud shortcode

WooCommerce - Custom tag cloud shortcode

<?php

/**
 * Custom WooCommerce tag cloud shortcode.
 *
 * Use the follow shortcode in your pages: [my_wc_tag_cloud]
 */
function my_custom_wc_tag_cloud_shortcode() {
	return wp_tag_cloud( array( 'taxonomy' => 'product_tag', 'echo' => false ) );
}

add_shortcode( 'my_wc_tag_cloud', 'my_custom_wc_tag_cloud_shortcode' );