Set first oembed in post to a global variable or function April 25, 2022 by Tarik Billa Since WordPress 3.6+ There is a function to print out all the media in the content. get_media_embedded_in_content();