Simple foreach loop help needed in wordpress “the loop” July 23, 2022 by Tarik Billa Why not just use the_ID() which will always be unique and won’t require any extra code to be used.