WordPress at a glance

get_queried_object() WP 1.0

Retrieve the currently-queried object.

Wrapper for WP_Query::get_queried_object().

  • Global. WP_Query. $wp_query Global WP_Query instance.
✈ 1 time = 0.000026s = very fast | 50000 times = 0.06s = speed of light

No Hooks.


Object. Queried object.



Code of get queried object: wp-includes/query.php WP 5.2.1

function get_queried_object() {
	global $wp_query;
	return $wp_query->get_queried_object();

Related Functions

From tag: query

More from category: Main Query

No comments
    Hello, !     Log In . Register