WP_Query::is_preview(): bool

In this article

Determines whether the query is for a post or page preview.

Return

bool Whether the query is for a post or page preview.

Source

public function is_preview() {
	return (bool) $this->is_preview;
}

Changelog

VersionDescription
3.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.