Jump to content


Photo
- - - - -

youtube embed not working when last entry in post

youtube

Best Answer Danny , 18 September 2013 - 12:15 PM

OK, apparently this is an issue with Wordpress 3.5 from what I've read and isn't theme specific. http://www.wpbeginne...-content_width/

You can either do one of two things - http://d.pr/i/8Vyi

 

You can either use the following code to set the width your self:

 
[embed width="123" height="456"] Add Media Link Here[/embed]

Or you can add the following to your child themes functions.php file:

 
if ( ! isset( $content_width ) ) $content_width = 600;

Replace the 600 with the width of your content area.

Go to the full post


  • Please log in to reply
39 replies to this topic

#1 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 16 September 2013 - 06:49 AM

Hi

 

if I embed a youtube video with normal url in DMS so that wordpress can pick it up as oembed it does not show up when it is the last line of test in the post. If I enter some words below the youtube link the video will show up.


Edited by hansonexperience, 16 September 2013 - 06:55 AM.


#2 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 16 September 2013 - 06:54 AM

I I enter youtube video with normal url for oembed DMS enters a small frame width="500" height="375"  although there is plenty of room. Other themes do fill the space of the postings (responsive)


Edited by hansonexperience, 16 September 2013 - 06:55 AM.


#3 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 16 September 2013 - 07:41 AM

Hi,

 

To embed videos in to Wordpress, you need to make sure that the video URL is on a line by itself. Therefore, when you add the URL, make sure to press Enter to add a new line. That is why it works when you add Text below it, as you have added a new line. This information is on the Wordpress embed docs.



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 16 September 2013 - 07:42 AM

Hi,

 

Not sure what you mean, can you provide a link, screenshot and the code you have used please.



#5 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 16 September 2013 - 09:17 PM

@Danny see: http://www.hansonexp...award-2013.html 

Small fram for youtube video. Just 500x375 although it could be larger. In iblogpro and other thems you get a larger screen when entering youtube link.

 

https://www.dropbox....11.13.59 PM.jpg



#6 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 16 September 2013 - 09:19 PM

@Danny strange as this worked in iblogpro and other themes. I had the video already in earlier posts but just saw some postings now having this problem in dms. But you could be right as it is do not see it in every post. 

Could it be that dms is somehow more accurate in this?



#7 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 11:11 AM

Not sure to be honest, I don't really use the embeds much, I just tried it after reading your issue and it worked for me.



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 11:16 AM

Your video is displaying correctly from the sizes you have set in the iframe code.

 

http://d.pr/i/RO1R

 

If you want to increase the size, you will need to change the dimensions in the code.



#9 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 18 September 2013 - 11:35 AM

@Danny yes it is working every now and then. SOmetimes it is not working.



#10 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 18 September 2013 - 11:40 AM

@Danny yes but I did NOT enter the size. DMS is doing that. ANd normal when you enter the YT url the dimensions are responsive as in iblogpro like when you use th shortcode of pagelines.

Now I have to use this shortcode instead of the YT video link and that's not preferable as not every theme is wprking with these short code. 

Would be nice if DMS enter an iframe which is progressive like in page lines iblogpro



#11 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 11:45 AM

If it isn't working then you most likely do not have a line break, to add media using the oEmbed the url needs to be on its own line.

 

All these instructions are here - http://codex.wordpress.org/Embeds

This isn't a DMS/PageLines issue, but related to Wordpress.



#12 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 18 September 2013 - 11:46 AM

@Danny yeah you told me already. But this was never an issue. All those video's were there from 2004 onwards :-)

And now in DMS it is a problem...



#13 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 11:46 AM

DMS can not add a height or width to iFrames.

 

Are you using oEmbeds to add this media, if so, then I suggest you read the instructions here - http://codex.wordpress.org/Embeds

 

You could also use our YouTube, DailyMotion and Vimeo shortcode - http://docs.pageline...ials/shortcodes



#14 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 11:51 AM

How are you adding the videos via a URL only? If that is the case then those videos can't have been there since 2004, as oEmbeds have only been implemented since version 2.9 which was released in Dec 2009.

 

So if you can tell me how you have added these videos to posts, I may be able to help you.



#15 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 18 September 2013 - 11:51 AM

@Danny as mentioned I know these shortcode but I do not want to use them as they are not compatible with other themes.

I use oembed and always just entered the video url (as in pagelines iblogpro). Then it should be responsive.

What is the difference then between function in this in iblogpro and dms as in iblogpro it was scaling in the complete width of the posting.



#16 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 18 September 2013 - 11:57 AM

Ha that's right. First I used the embed code of Youtube. In iblogpro I entered just the url of the video. And then the video was scaled to the complete width of the posting and was responsive. Now in DMS the iframe dimensions are much smaller which does not make sense. And I want as little code as possible. So just entering the url with large dimensions.



#17 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 12:15 PM   Best Answer

OK, apparently this is an issue with Wordpress 3.5 from what I've read and isn't theme specific. http://www.wpbeginne...-content_width/

You can either do one of two things - http://d.pr/i/8Vyi

 

You can either use the following code to set the width your self:

 
[embed width="123" height="456"] Add Media Link Here[/embed]

Or you can add the following to your child themes functions.php file:

 
if ( ! isset( $content_width ) ) $content_width = 600;

Replace the 600 with the width of your content area.



#18 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 September 2013 - 12:24 PM

I have merged your two topics regarding Youtube.



#19 hansonexperience

hansonexperience

    Advocate

  • Members

  • 363 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 19 September 2013 - 08:20 AM

@Danny ah that's a nice trick. But how do I work with a child theme function.php? (newbie ;-) )



#20 Danny

Danny

    Is Awesome!

  • Moderators
  • 15064 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 September 2013 - 08:51 AM

You can find all the information on Child themes here - http://codex.wordpre...rg/Child_Themes

 

We also provide instructions on how to customize your site using a child theme here - http://docs.pageline...ase-child-theme

 

Download Nicks child theme - https://github.com/b...icks-base-theme







Also tagged with one or more of these keywords: youtube