1. Home
  2. Wordpress
  3. Get the id

get_the_ID returns am ID of a current item in the loop.

#wordpress#php
echo get_the_ID();
copy
Full Wordpress cheatsheet