post_class() breaks out of formatting. . . extra markup also generated July 15, 2022 by Tarik Billa Use get_post_class() when you want the values to be returned rather than echod.