# Remove the Yoast SEO Comments From the Page Source

> Stops Yoast SEO from wrapping its meta tags in "This site is optimized with the Yoast SEO plugin" HTML comments. The tags themselves stay.

- Type: PHP
- Runs: Frontend only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: yoast, seo, cleanup
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/yoast-remove-html-comments/

## Code

```php
add_filter( 'wpseo_debug_markers', '__return_false' );
```

## Notes

Only the comments are removed; titles, meta descriptions and schema are untouched.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove the Yoast SEO Comments From the Page Source" 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/
