• I added:

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

    to my functions.php which made the youtube embed of videos smaller; however I would like to further style the video so it fits with my site’s theme. I would like to make it float to the left, add a border and some other stuff.

    Is there another way to change this via the functions.php file?

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter luxman

    (@luxman)

    I found this code:

    add_filter('embed_oembed_html', 'my_embed_oembed_html', 99, 4);
    function my_embed_oembed_html($html, $url, $attr, $post_id) {
      return '<div id="video">' . $html . '</div>';
    }

    Which works but not sure if it messes anything else up?

    Your code works great !
    I changed the id of the div to a class since am embedding lots of videos !
    Thanks a lot ^^

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘oEmbed float wordpress and css styling options?’ is closed to new replies.