Merge pull request #3848 from BFTrick/update-product-page-css-classes
Updating Product Page CSS Classes
This commit is contained in:
commit
82cb89a9a6
|
@ -240,7 +240,7 @@ if ( ! function_exists( 'wc_product_post_class' ) ) {
|
||||||
$categories = wp_get_post_terms( $product->id, "product_cat" );
|
$categories = wp_get_post_terms( $product->id, "product_cat" );
|
||||||
if ( ! empty( $categories ) ) {
|
if ( ! empty( $categories ) ) {
|
||||||
foreach ($categories as $key => $value) {
|
foreach ($categories as $key => $value) {
|
||||||
$classes[] = "category-" . $value->slug;
|
$classes[] = "product-cat-" . $value->slug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ if ( ! function_exists( 'wc_product_post_class' ) ) {
|
||||||
$tags = wp_get_post_terms( $product->id, "product_tag" );
|
$tags = wp_get_post_terms( $product->id, "product_tag" );
|
||||||
if ( ! empty( $tags ) ) {
|
if ( ! empty( $tags ) ) {
|
||||||
foreach ($tags as $key => $value) {
|
foreach ($tags as $key => $value) {
|
||||||
$classes[] = "tag-" . $value->slug;
|
$classes[] = "product-tag-" . $value->slug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue