I just discovered that videos do not show up when you are using excerpts (<?php the_excerpt(); ?>) on certain pages instead of publishing the full content (<?php the_content(); ?>) on the post.
I use Viper’s Video Quicktags for easily embedding videos in my blogs. Well, it turns out that instead of the video showing up on excerpt pages, the embedding code shows up instead.
Not very pretty.
Now, if you have a post, and there’s a video in it past the excerpt point, you’re ok. But I wanted to have a category that was kind of a like a vlog, where the post consists of a video and that’s it.
So I had to change all of my pages using the_excerpt (or The Excerpt Reloaded, which you should use to retain HTML formatting in your excerpts like links, bullets, etc.) to the_content.
But all is not lost – WordPress gives you two ways to manually generate excerpts that will appear on all multi-post pages, like the home page, archive page, and category page:
- The “more” tag and button. If you are using the WYSIWYG editor, there is a “Split post with More tag” button. It is the button directly to the left of the Spellcheck button (with the ABC on it). Place your cursor where you want to end the excerpt, and click on the button. Or, press Alt+t.
- Enter an excerpt in the Optional Excerpt field below the editor. I recently discovered that you can enter HTML in there, so if you want an image to appear in the excerpt, for example, you can enter the <a href=””> tag and it works!
From a usability standpoint it’s probably better to manually create excerpts because they won’t cut sentences in the middle like the automatic feature does, and you can write a compelling teaser that will draw your reader in if you use the Optional Excerpt field.