Hi Support,
I have selected “Not Activated” under Layout Builder -> Automated Schema.org HTML Markup.
Unfortunately, schema markup continues to be added to products, etc… I have confirmed this markup is coming from the Enfold theme by activating one of the basic WordPress themes.
I need to get this resolved ASAP as it’s causing duplicate schema markup since we are using another plugin for generating the schema markup.
I have added a link to one of the products with the extra schema.
I appreciate your help!
Hey nancylittle419,
Thank you for the inquiry.
The schema markup is actually from the shop plugin or from Woocommerce. It is not generated by the theme. You can remove it by using this plugin.
// https://wordpress.org/plugins/remove-schema/
Or by adding this filter in the functions.php file.
add_filter("woocommerce_structured_data_product", function($markup) {
return "";
}, 10, 1);
Best regards,
Ismael
Thank you, Ismael,
I tried your suggestion and it broke the layout on our product pages. However, you did point me in the right direction!
I found this on WordPress.org and used the suggested solution for removing the JSON/LD data from the front end of the site.
https://wordpress.org/support/topic/how-to-remove-the-default-woocommerce-json-ld-structured-data/
add_action( ‘init’, ‘my_remove_json_ld_frontend’ );
function my_remove_json_ld_frontend() {
remove_action( ‘wp_footer’, array( WC()->structured_data, ‘output_structured_data’ ), 10 );
}
I appreciate your help!
Thank you
Hi,
Did you need additional help with this topic or shall we close?
Best regards,
Jordan Shannon
Hi Jordan,
Please close as the issue is resolved.
Thanks!
Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon