-
-
Save anastransvelo/86be36b27ecb82c356b5c25d4aba0cdf 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 ); |
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
.products>.product .loop-product-tags { | |
margin-bottom: .4em; | |
font-size: .8em; | |
line-height: 1.05em; | |
height: 1.1em; | |
} | |
i.product .loop-product-tags a { | |
color: #878787; | |
} | |
@media (min-width: 1200px) { | |
.products>.product .loop-product-tags { | |
margin-bottom: 6px; | |
font-size: .857em; | |
line-height: 1.05em; | |
height: 1.05em; | |
display: block; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment