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