-
-
Save zstepek/597c2091abaac7811bb3 to your computer and use it in GitHub Desktop.
/* Remove product meta */ | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); |
Thx :)
cheers
Thanks
And if that din't work?
This still works 2 days away from 2022.
@carmolim If that didn't work right off, you need to hook it to an action that comes before, like this
/**
* Remove hooked actions from single product template to remove unwanted elements
*
*/
public function remove_single_product_elements(){
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
}
add_action('woocommerce_before_single_product', 'remove_single_product_elements' );
Pairs well with this
https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
Hello!
Nice, but what if i just want to remove the link (words stay there)?
Add this css snippet
.product_meta{
cursor: default;
pointer-events: none;
text-decoration: none;
}
Hopefully I can jump in on this thread! Currently, my product meta includes SKU, Tags, Category, GTIN, MPN, and Brand. I would like to remove Tags, GTIN, MPN, and Brand....leaving only the SKU and Category. Could you possibly assist with the correct CSS to accomplish this? Many thanks!!!
@NanetteG using a child theme, add a copy of /woocommerce/templates/single-product/meta.php
to your child theme at themes/your-theme/woocommerce/single-product/meta.php
, then edit the file to only show the data you’d like to display.
Thanks you very much! Works!!