Turn Off All in One SEO Schema on Selected Pages
Removes the All in One SEO JSON-LD graph from the pages you list while keeping its titles and meta tags.
Opens WPIDE on
Code
// IDs of posts or pages without AIOSEO schema.
$wpide_aioseo_no_schema = array( 12, 34 );
add_filter( 'aioseo_schema_disable', function ( $disabled ) use ( $wpide_aioseo_no_schema ) {
if ( is_singular() && in_array( get_queried_object_id(), array_map( 'intval', $wpide_aioseo_no_schema ), true ) ) {
return true;
}
return $disabled;
} );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.