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

---

# WP_Query::is_privacy_policy(): bool

## In this article

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

[ Back to top](https://developer.wordpress.org/reference/classes/wp_query/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/classes/wp_query/is_privacy_policy/?output_format=md#description)󠁿

This is the page which shows the Privacy Policy content of your site.

Depends 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”.

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

 bool Whether the query is for the Privacy Policy page.

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

    ```php
    public function is_privacy_policy() {
    	if ( get_option( 'wp_page_for_privacy_policy' )
    		&& $this->is_page( get_option( 'wp_page_for_privacy_policy' ) )
    	) {
    		return true;
    	} else {
    		return false;
    	}
    }
    ```

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

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

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

Determines whether the query is for an existing single page.

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

Retrieves an option value based on an option name.

  |

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

Determines whether the query is for the Privacy Policy page.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_query/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%2Fclasses%2Fwp_query%2Fis_privacy_policy%2F)
before being able to contribute a note or feedback.