# Show a Custom Akismet Privacy Notice Under Comments

> Turns on the Akismet privacy notice below the comment form and replaces it with your own wording and link to your privacy policy, which many privacy laws expect.

- Type: PHP
- Runs: Run everywhere
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: akismet, privacy, comments
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/akismet-privacy-notice/

## Code

```php
add_filter( 'akismet_comment_form_privacy_notice', function () {
    return 'display';
} );

add_filter( 'akismet_comment_form_privacy_notice_markup', function () {
    $policy = get_privacy_policy_url();

    return '<p class="akismet_comment_form_privacy_notice" style="font-size:.85em">'
        . esc_html__( 'Comments are checked for spam by Akismet.' ) . ' '
        . ( $policy ? '<a href="' . esc_url( $policy ) . '">' . esc_html__( 'How we handle your data' ) . '</a>' : '<a href="https://akismet.com/privacy/" rel="nofollow noopener">' . esc_html__( 'How Akismet handles your data' ) . '</a>' )
        . '</p>';
} );
```

## Notes

Uses your Privacy Policy page from Settings > Privacy when one is set.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Show a Custom Akismet Privacy Notice Under Comments" 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/
