Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment