Fix for Video Resizing to Small oEmbeds

Community Forums Forums Design Tips and Tricks Fix for Video Resizing to Small oEmbeds

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Anita 1 year, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15508

    Anita
    Participant
    Post count: 7578

    I was helping someone on the Forum with a issue with his videos resizing to really small on his AgentPress site. After doing some research, I found what I think is the problem and wanted to share it. Someone posted this on the support forum on WordPress.org – http://wordpress.org/support/topic/links-cause-youtube-videos-to-display-smaller?replies=1, stating his videos were resizing only if the video had been applied to a page that contained other links. If he embedded the code on a page that only contained text, the videos would size correctly. This lead me to look further and then I found this – http://www.wpbeginner.com/wp-themes/how-to-set-oembed-max-width-in-wordpress-3-5-with-content_width/. They state that if you add the code below to your FUNCTIONS.PHP file, this will resolve the issue.

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

    This is a problem that started happening with WP 3.5 and I wanted to share this in case someone else had the same problem.


    When asking for help, please provide a link or screen shot showing your problem!
    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me!

    #15666

    SoZo
    Moderator
    Post count: 1573

    Thanks for posting


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15668

    Anita
    Participant
    Post count: 7578

    Sure, and here’s another one that has even more detail – http://wpengineer.com/2487/disable-oembed-wordpress/..


    When asking for help, please provide a link or screen shot showing your problem!
    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me!

    #17340

    Anita
    Participant
    Post count: 7578

    Note:
    Some people are saying it’s not working for them. All you do is just post this at the end of Functions.php and set the 600 to whatever width you want.

    [php]if ( ! isset( $content_width ) ) $content_width = 600;[/php]

    There are some who said that the Jetpack plugin was a conflict and that when they turned it off, then it work. However, I’ve tested this with the most recent version of WP and most recent version of Genesis and it works perfectly for me.


    When asking for help, please provide a link or screen shot showing your problem!
    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.