Disable Google FLoC in WordPress

Disable Google FLoC in WordPress on your child site.

Snippet Type

Execute on Child Sites


function disable_floc($headers) {
    $headers['Permissions-Policy'] = 'interest-cohort=()';
    return $headers;
add_filter('wp_headers', 'disable_floc');

This one is a must have! Thanks @sebastian-moran. Really appreciate this one…

@sebastian-moran - I just pushed it to our own website: https://wpexpert.ca and it doesn’t appear! We are using Oxygen, so not a theme. Is it possible that it doesn’t work with Oxygen?
I cleared the cache as well, just in case…

Not tested it with Oxygen.

You could also test using Disable FLoC – WordPress plugin | WordPress.org

1 Like

Thanks, @sebastian-moran but I will prefer to use a snippet than adding a plugin… I will try to figure it out.
Maybe need to put in in Advanced Script with the header.

1 Like

Let us know if you are able to get it working on your site.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.