Created
May 24, 2019 07:12
-
-
Save farookibrahim/7f14be5808335615897e7c9604063c82 to your computer and use it in GitHub Desktop.
Electro display tags in archive
This file contains 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
if ( ! function_exists( 'electro_template_loop_tags' ) ) { | |
/** | |
* Output Product Tags | |
* | |
*/ | |
function electro_template_loop_tags() { | |
global $product; | |
$product_id = electro_wc_get_product_id( $product ); | |
$tags = wc_get_product_tag_list( $product_id ); | |
echo apply_filters( 'electro_template_loop_tags_html', wp_kses_post( sprintf( '<span class="loop-product-tags">%s</span>', $tags ) ) ); | |
} | |
} | |
add_action( 'woocommerce_before_shop_loop_item_title', 'electro_template_loop_tags', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment