• When I place a youtube video in a post it shows up just fine. However on the front page where the most recent articles are shown, the article text shows up but now video.

    What can I do to rectify that.

    I am using oceanic pro

Viewing 1 replies (of 1 total)
  • So the problem isn’t with the theme, but with a standard way in which WordPress works. When outputting a post excerpt, WordPress will strip off any HTML codes, including the code used to display YouTube videos. You may have also noticed that any special text formatting (like bold, italic, etc) also does not appear in the post excerpt for the same reason. The reason why WordPress does this is because it wants to make sure that a closing tag doesn’t get accidentally left off if it happens to come after the 55 word count for the default excerpt.

    The way to get around this is to create a manual excerpt. Go into the post editor and scroll down. Hopefully you will see a field labeled Excerpt. If you do not, then click the Screen Options tab in the upper right corner of the screen, then check the box labeled Excerpt, and the field should then appear.

    Now copy & paste however much of the original post that you want to show from the original post content field into the Excerpt field, including your YouTube code (note, you want to use the iframe tag, don’t just paste in the URL of the video). Once you Update the post, your excerpt should now show the YouTube video.

    I like using the manual Excerpt field, not only because you can include HTML code, but because you have total control over how much of the excerpt you want to display, i.e., you can avoid having the excerpt stop in the middle of a sentence. You can even make the excerpt totally different than the original post, if you think that is appropriate.

Viewing 1 replies (of 1 total)
  • The topic ‘Youtube does not show up on front page’ is closed to new replies.