# 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.

- Type: PHP
- Runs: Frontend only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: aioseo, schema, json-ld
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/aioseo-schema-off-selected-pages/

## Code

```php
// 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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Turn Off All in One SEO Schema on Selected Pages" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
