-
-
Save Giannisduke/af592cfafd970876bd63d1beb78f2f73 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