-
-
Save brunoalvarenga/40a9a0559d5d63942a78988978ebfc66 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