# Drop the Sitelinks Search Box From Rank Math Schema

> Deletes the SearchAction (sitelinks search box) from the WebSite entity in Rank Math's JSON-LD.

- Type: PHP
- Runs: Frontend only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: rank-math, schema, search
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/rankmath-remove-search-action/

## Code

```php
add_filter( 'rank_math/json_ld', function ( $data ) {
    if ( isset( $data['WebSite'] ) && is_array( $data['WebSite'] ) ) {
        unset( $data['WebSite']['potentialAction'] );
    }

    return $data;
}, 99 );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Drop the Sitelinks Search Box From Rank Math Schema" 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/
