WP_Query::get_queried_object_id(): int

In this article

Retrieves the ID of the currently queried object.

Return

int

Source

public function get_queried_object_id() {
	$this->get_queried_object();
	return $this->queried_object_id ?? 0;
}

Changelog

VersionDescription
1.5.0Introduced.

User Contributed Notes

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