The Fix: Youtube Videos Broke My Blog!
March 5th, 2008 by Marie-Lynn Richard in The FixYou may have noticed that when you embed a Youtube video in your blog it looks just fine until you edit that post again. This is a problem present in most Wordpress themes, or at least the ones I like the best.
That is because Wordpress parses your edited code and does two things that disrupt the display of the rest of the page.
First of all, it will insert a line break after your parameters (</param>). This is simply because the engine recognizes that a closing tag is a decent place to put a line break. I agree for the most part.
Second of all, it takes </object> at the end of the embed code and puts it just after the <object> definition rendering the rest of the parameters useless. This will usually happen the second time you edit the post. Why? Because there are line breaks in your parameters!
By the way, if you notice your code starts with & lt ;/object, it is because you pasted your embed code while in Visual mode. Simply delete the code block and re-paste it while in Code mode.
What can you do?
Don’t ever edit that post again! Just kidding, here’s what you should do while editing those typos.
Make sure there are no line breaks by putting your cursor at the end of the line and pressing [Delete]. If you delete a character, simply type it back. When you are done you will notice that the end of each line happens to be a space within the <param> like the code shown below.
And don’t forget to take the </object> and put it back at the end!
Now share that sleepee kitteh with the world!
Contact Me
Subscribe


















