get post id in worpdrss code example Example: wordpress get post id // Retrieve the ID of the current item in the WordPress Loop. get_the_ID()