get_queried_object_id(): int
Retrieves the ID of the currently queried object.
Description
Wrapper for WP_Query::get_queried_object_id().
Return
int ID of the queried object.
Source
File: wp-includes/query.php
.
View all references
function get_queried_object_id() {
global $wp_query;
return $wp_query->get_queried_object_id();
}
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |