WP_Query::get_queried_object_id()
Retrieve ID of the current queried object.
Description Description
Return Return
(int)
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;
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |