php – WordPress get_media_embedded – WordPress Development Stack Exchange


 test text

<div class="video">

        $media = get_media_embedded_in_content( 
        apply_filters( 'the_content', get_the_content() ));



<div class="uitgelichttitel">
    <?php the_title();?>

that’s my code

Finally shows me the video, but I am getting this on the front-end:

Array ( [0] => )


Changing print_r($media) to print($media) removes the video.

Extra about me

I apologize if this is a no brainer. Have been trying to learn how all of this works for a while now, including plenty of hours today, probably going to be working on figuring this out until the night. Figured maybe I could get someone to tell me what’s up in easier terms, there’s already a lot that I am trying to get a grasp on. Thank you. I am new to WordPress theme development, new to PHP and new to JS.

Tom J Nowell 2 years 2022-06-17T09:55:08-05:00 0 Answers 0 views 0

Leave an answer