<?php get_the_ID(); ?>

Returns the numeric ID of the current post.

Advertisements