WP_Query::get_queried_object_id(): int

Retrieves the ID of the currently queried object.


Return

int


Top ↑

Source

File: wp-includes/class-wp-query.php. View all references

public function get_queried_object_id() {
	$this->get_queried_object();

	if ( isset( $this->queried_object_id ) ) {
		return $this->queried_object_id;
	}

	return 0;
}


Top ↑

Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes

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