Not shortcode
I had problems with youtube embeds in Pagelines DMS, the theme I am using right now. I do not want to use the shortcode of DMS such as

[pl_codebox][pl_video video:”youtube” id=”XXX”][/pl_codebox]

where xxx is the id of the youtube video. Because if I want to switch themes this shortcode is not working anymore.

Therefore I wanted to use the normal oembed of youtube video’s by entering the url in the plain text (not wysiwyg) tab. But this gives a small videoframe of 500×281 although it should have a width of 700px. I have entered this issue in the Pagelines forum, but up till now there is no solution.
When testing oembed with another theme I saw that the video frame (iframe) was correct, filling the container of the column. So I think this is a DMS bug.

Code in functions.php
Fortunately Danny helped me out to use some code to force all video’s to have 700px width. So I put this code in my functions.php of my child theme:

[pl_codebox]if ( ! isset( $content_width ) ) $content_width = 700;[/pl_codebox]

After some discussion on the great forum of Pagelines I got two solutions:



which produces a fluid and responsive video frame. The disadvantage is that you need to enter a lot of code for this frame.Ypu need to pick up the embed code, put it in the text tab and have the right div with class.

[pl_codebox]add_filter(’embed_oembed_html’, ‘my_embed_oembed_html’, 99, 4);
function my_embed_oembed_html($html, $url, $attr, $post_id) {
return ‘

‘ . $html . ‘


This is built upon the embed code for fitvids. If you place this in the your functions.php (in the child theme) you need not enter the embed code in a posting. It just wraps the youtube url in the right code so it is a fluid and responsive frame. The disadvantage is that it loads slow. First you see the small frame and then it switches to the fluid responsive frame.

I do not know yet which solution I am going to use. Hopefully the developers of Pagelines of contributors in the forum come up with a solution.