A WordPress-centric search engine for devs and theme authors



get_queried_object_id ›

Since3.1.0
Deprecatedn/a
get_queried_object_id ( No parameters )
Returns:
  • (int) ID of the queried object.
Defined at:
Codex:

Retrieve ID of the current queried object.

Wrapper for WP_Query::get_queried_object_id().



Source

function get_queried_object_id() {
	global $wp_query;
	return $wp_query->get_queried_object_id();
}