I am having an issue with a query outputting the YouTube url rather than the video itself. The post I am querying has a Youtube url in the content area. Of course, when viewing the post, you don’t see the url, you see the video, as it’s supposed to be.

When using get_the_content to display this post on another page, it’s outputting the Youtube url rather than embedding the video automatically. If I use the_content, then it outputs the video, but it does so before the other html.

Here’s my query, if that helps: http://pastebin.com/zUHXSjui

1 Answer 1


The problem is that as you are calling the function directly, there are filters that arent being called, you can fix this by calling the apply_filters function using the_content filter, like this.

apply_filters( 'the_content', $content );

Where $content is the result of get_the_content()


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.