0

I'm creating my first theme.

If I add the following content to a post, the video displays fine on the site:

<p style="text-align: center;"><video width="320" height="240" controls="controls">
<source src="http://domain.com/videos/whatever.ogv" type="video/ogg" />
Install <a href="http://www.mozilla.org/pt-BR/firefox" target="_blank">
<strong>Firefox</strong></a> or <a href="https://www.google.com/chrome" target="_blank">
<strong>Chrome</strong></a> to watch the video.</video></p>

<p style="text-align: center;"><a href="http://localhost/2012/02videos/">go back</a></p>

However, if I add the same content to a page, this is what I get when viewing the source:

 <p>Instal Firefox or Chrome to watch the video. go back <a href="http://localhost/page/">Read more</a></p>

It doesn't matter if it's a new post / page or if I change content of an existing one. I'm running WP 3.6 pt-br, I have disabled all the plugins and the issue persists. If I use other themes (twenty thirteen, twenty ten, etc) everything works fine. My functions.php file is empty.

1

On the current theme, there was no page.php file present, so WordPress was reading index.php and, according to the theme's instructions, displaying the_excerpt(). It will strip many tags, including <video>, and that's exactly what was happening.

The content of the posts is is displayed based (mainly) on the contents of the file single.php, but for pages it is (mainly) the file page.pgp. (For more detailed information, everything is well explained and documented in the Template Hierarchy section on the Codex).

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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