• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2966

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout
  • Log in

Remove Meta Per Single Product – WooCommerce

Remove Meta Per Single product WooCommerce

$0.00

Category: WooCommerce
  • Description

Need to remove, category and tag links from a single product?

There’s 2 steps. (1) The input and (2) the output.

Step 1 – You can use WordPress custom fields or a plugin like ACF to create a custom field named remove_meta.

Here’s the .json import file for ACF which sets up your field otherwise create a WordPress field like this :

Step 2 – Paste this PHP code at the end of your child themes functions file.

add_action( 'woocommerce_single_product_summary', 'remove_single_meta', 39 );
function remove_single_meta() {

if ( ! empty( get_post_meta( get_the_ID(), 'remove_meta', true ) ) ) {

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );

}}

These solutions may also help :

  • Add Product Meta To Shop Loop Archives - WooCommerce

    Add Product Meta To Shop Loop Archives – WooCommerce

    $75.00

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Code written by Brad Dalton specialist for Genesis & WooCommerce.

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Tags
  • Account
  • Checkout
  • Cart
  • Hire Me
  • Log in
 

Loading Comments...