get_queried_object()

Retrieve the currently-queried object.


Description Description

Wrapper for WP_Query::get_queried_object().


Return Return

(object) Queried object.


Top ↑

Source Source

File: wp-includes/query.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.