the_ID() WordPress Function
The the_ID() function is used to display the post or page ID. This function can be used within the loop.
the_ID() #
Displays the ID of the current item in the WordPress Loop.
Source
File: wp-includes/post-template.php
function the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
echo get_the_ID();
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 0.71 | Introduced. |