Title: is_privacy_policy
Published: May 7, 2019
Last modified: February 24, 2026

---

# is_privacy_policy(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#wp--skip-link--target)

Determines whether the query is for the Privacy Policy page.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#description)󠁿

The Privacy Policy page is the page that shows the Privacy Policy content of the
site.

[is_privacy_policy()](https://developer.wordpress.org/reference/functions/is_privacy_policy/)
is dependent on the site’s “Change your Privacy Policy page” Privacy Settings ‘wp_page_for_privacy_policy’.

This function will return true only on the page you set as the “Privacy Policy page”.

For more information on this and similar theme functions, check out the [ Conditional Tags](https://developer.wordpress.org/themes/basics/conditional-tags/)
article in the Theme Developer Handbook.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#return)󠁿

 bool Whether the query is for the Privacy Policy page.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#source)󠁿

    ```php
    function is_privacy_policy() {
    	global $wp_query;

    	if ( ! isset( $wp_query ) ) {
    		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    		return false;
    	}

    	return $wp_query->is_privacy_policy();
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/query.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/query.php#L529)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/query.php#L529-L538)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Query::is_privacy_policy()](https://developer.wordpress.org/reference/classes/wp_query/is_privacy_policy/)`wp-includes/class-wp-query.php` |

Determines whether the query is for the Privacy Policy page.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [_doing_it_wrong()](https://developer.wordpress.org/reference/functions/_doing_it_wrong/)`wp-includes/functions.php` |

Marks something as being incorrectly called.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#)

| Used by | Description | 
| [get_body_class()](https://developer.wordpress.org/reference/functions/get_body_class/)`wp-includes/post-template.php` |

Retrieves an array of the class names for the body element.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_privacy_policy/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.2.0](https://developer.wordpress.org/reference/since/5.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_privacy_policy%2F)
before being able to contribute a note or feedback.