Getting the WordPress Post ID of current post May 5, 2023 by Tarik Try using this: $id = get_the_ID();