Displays the ID of the current item in the WordPress Loop.
Source
function the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
echo get_the_ID();
}
Changelog
Version | Description |
---|---|
0.71 | Introduced. |
Displays the ID of the current item in the WordPress Loop.
function the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
echo get_the_ID();
}
Version | Description |
---|---|
0.71 | Introduced. |
You must log in before being able to contribute a note or feedback.
Default usage.
This example shows how to provide a unique anchor identifier to each post.