WP_Query::get_queried_object_id()

Retrieve ID of the current queried object.


Description Description


Return Return

(int)


Top ↑

Source Source

File: wp-includes/class-wp-query.php

	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

Changelog
Version Description
1.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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