Disable yasr from code
-
I’m trying to disable the plugin for a given custom post type. The use case is: I’m creating a listing based on custom post types retrieved by the DB via
new WP_Queryand then iterating. The issue I have is that I’m getting the starts added in each and every element from the loop, resulting in many schemas in the same web.With
add_filter('yasr_filter_schema_jsonld', function () {return false;});I get an empty
application/ld+jsonscript but I would like to get rid off it completely.<script type="application/ld+json"></script>What could I do to either disable the plugin for those specific custom post types or remove the script from by applying some filter somehow?
The topic ‘Disable yasr from code’ is closed to new replies.