How to remove microdata markup in woocommerce?


by jasen , in category: PHP CMS , 19 days ago

How to remove microdata markup in woocommerce?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer


by gilbert , 18 days ago


To remove microdata markup in WooCommerce, you can follow these steps:

  1. Go to your WordPress dashboard and navigate to "Appearance" > "Theme Editor"
  2. Select the active theme you are using for your WooCommerce store
  3. Look for the "functions.php" file in the theme editor
  4. Add the following code to the bottom of the functions.php file:
remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 );

  1. Save the changes

This code will remove the structured data markup that WooCommerce adds to the footer of your website. This will effectively remove the microdata markup from your WooCommerce store.

After making this change, be sure to test your website to ensure that the microdata markup has been successfully removed without affecting the functionality of your WooCommerce store.