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

get_the_ID()

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

The ID of the current item in the WordPress Loop. False if $post is not set.
$post = get_post();
PHP, Wordpress