get_queried_object()
Retrieves the currently queried object.
Description
Wrapper for WP_Query::get_queried_object().
Return
(WP_Term|WP_Post_Type|WP_Post|WP_User|null) The queried object.
Source
File: wp-includes/query.php
function get_queried_object() {
global $wp_query;
return $wp_query->get_queried_object();
}
Related
Uses
Uses | Description |
---|---|
wp-includes/class-wp-query.php: WP_Query::get_queried_object() |
Retrieves the currently queried object. |
Used By
Used By | Description |
---|---|
wp-includes/rest-api.php: rest_get_queried_resource_route() |
Gets the REST route for the currently queried object. |
wp-includes/general-template.php: feed_links_extra() |
Displays the links to the extra feeds such as category feeds. |
wp-includes/general-template.php: get_the_archive_title() |
Retrieves the archive title based on the queried object. |
wp-includes/general-template.php: wp_title() |
Displays or retrieves page title for all areas of blog. |
wp-includes/general-template.php: single_post_title() |
Displays or retrieves page title for post. |
wp-includes/general-template.php: single_term_title() |
Displays or retrieves page title for taxonomy term archive. |
wp-includes/general-template.php: wp_get_document_title() |
Returns document title for the current page. |
wp-includes/widgets/class-wp-widget-text.php: WP_Widget_Text::widget() |
Outputs the content for the current Text widget instance. |
wp-includes/widgets/class-wp-widget-custom-html.php: WP_Widget_Custom_HTML::widget() |
Outputs the content for the current Custom HTML widget instance. |
wp-includes/template.php: get_attachment_template() |
Retrieves path of attachment template in current or parent template. |
wp-includes/template.php: get_page_template() |
Retrieves path of page template in current or parent template. |
wp-includes/template.php: get_single_template() |
Retrieves path of single template in current or parent template. Applies to single Posts, single Attachments, and single custom post types. |
wp-includes/template.php: get_embed_template() |
Retrieves an embed template path in the current or parent template. |
wp-includes/template.php: get_author_template() |
Retrieves path of author template in current or parent template. |
wp-includes/template.php: get_category_template() |
Retrieves path of category template in current or parent template. |
wp-includes/template.php: get_tag_template() |
Retrieves path of tag template in current or parent template. |
wp-includes/template.php: get_taxonomy_template() |
Retrieves path of custom taxonomy term template in current or parent template. |
wp-includes/link-template.php: edit_term_link() |
Displays or retrieves the edit term link with formatting. |
wp-includes/category-template.php: term_description() |
Retrieves term description. |
wp-includes/category-template.php: wp_list_categories() |
Displays or retrieves the HTML list of categories. |
wp-includes/post-template.php: wp_list_pages() |
Retrieves or displays a list of pages (or hierarchical post type items) in list (li) format. |
wp-includes/class-wp.php: WP::handle_404() |
Set the Headers for 404, if nothing is found for requested URL. |
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |