Created
July 6, 2016 03:34
-
-
Save claudiosanches/67e57a796dd98f6f735e71439577dbcc to your computer and use it in GitHub Desktop.
WooCommerce - Custom tag cloud shortcode
This file contains hidden or 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 | |
/** | |
* 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
thank you