WordPress filter hook
wpseo_json_ld_output
Fired by 8 WordPress plugins, running on 10M+ sites between them.
“Filter: 'wpseo_json_ld_output' - Allows disabling Yoast's schema output entirely.”
How to use wpseo_json_ld_output
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wpseo_json_ld_output', function( $deprecated_data, $arg2 ) {
// Change $deprecated_data here.
return $deprecated_data;
}, 10, 2 );Argument names come from Yoast SEO's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
8 plugins that fire wpseo_json_ld_output
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Yoast SEO10+ million installs
apply_filters( 'wpseo_json_ld_output', $deprecated_data, '' )src/presenters/schema-presenter.php:35 -
WP MyLinks1,000+ installs
apply_filters( 'wpseo_json_ld_output', '', '' )wp-mylinks.php:1232 -
AEO God Mode300+ installs
apply_filters( 'wpseo_json_ld_output', true )includes/class-schema.php:1740 -
Rank Authority60+ installs
apply_filters( 'wpseo_json_ld_output', ['_placeholder' => true], '' )includes/class-ra-schema-integrations.php:91 -
PageOne: AI Blog Writer, Auto Posting and SEO10+ installs
apply_filters( 'wpseo_json_ld_output', true, '' )includes/class-pageone-seo.php:422 -
SummitCiteFewer than 10 installs
apply_filters( 'wpseo_json_ld_output', true, '' )src/Schema/SchemaOwnership.php:662 -
CiteProofFewer than 10 installs
apply_filters( 'wpseo_json_ld_output', true )includes/seo-integration.php:215 -
Lesuto Chameleon CommerceFewer than 10 installs
apply_filters( 'wpseo_json_ld_output', true )includes/class-chameleon-breadcrumb-trail.php:88
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.