Turn Off Rank Math Schema on Selected Pages
Removes all Rank Math JSON-LD from the posts or pages you list, so you can add hand-written structured data there instead.
Opens WPIDE on
Code
// IDs of posts or pages without Rank Math schema.
$wpide_rm_no_schema = array( 12, 34 );
add_filter( 'rank_math/json_ld', function ( $data ) use ( $wpide_rm_no_schema ) {
if ( is_singular() && in_array( get_queried_object_id(), array_map( 'intval', $wpide_rm_no_schema ), true ) ) {
return array();
}
return $data;
}, 999 );
Notes
List post or page IDs. Meta tags from Rank Math still print.
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.