I'm having a problem viewing the Youtube video.

In my single-custom I am using:

<? Php
echo wpautop ($post-> post_content);

And when I put the Youtube link he is not showing the video but only his link.

What could be wrong?

1 Answer 1


You should use the_content function to process embeds. Another way is to apply the_content filter.

apply_filters( 'the_content', $post->post_content' );
  • You are welcome. Mark my answer as the solution, please Commented Aug 22, 2017 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.