W3cubDocs

/WordPress

the_ID()

Display the ID of the current item in the WordPress Loop.

Description

Source

File: wp-includes/post-template.php

function the_ID() {
	echo get_the_ID();
}

Changelog

Version Description
0.71 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/the_id