wpseek.com
A WordPress-centric search engine for devs and theme authors



get_queried_object_id › WordPress Function

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

Retrieves the ID of the currently 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();
}