get_queried_object_id

Advertisement

Summery Summery

Retrieve ID of the current queried object.

Syntax Syntax

get_queried_object_id()

Description Description

Wrapper for WP_Query::get_queried_object_id().

Return Return

(int) ID of the queried object.

Source Source

File: wp-includes/query.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.