• mfuchs

    (@mfuchs)


    Hi together,

    When I embed a Vimeo video into a post or page I use vimeo’s embed code to be able to modify size and color. I switch to HTML mode, paste the iframe code in and update. Which works, the video is displayed and runs.

    However, when I go back to the same page in the admin at a later point the embed code is gone (also from HTML mode).

    Any idea on how this can be fixed (other than using Viper’s Video Quicktags Plugin)?

    Any help would be appreciated.

    Thanks,
    Martin

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try storing the code in a custom field. Even if you don’t have the video display via a custom field, you’ll always have it there in case the code is removed from the post.

    Edit the post, find the field, copy/paste.

    My question is why is it happening. Maybe a plugin?

    Moderator Kathryn Presner

    (@zoonini)

    WordPress strips out iframe code – any iframe code, not just Vimeo’s – if you switch back and forth between the visual editor and HTML mode.

    Try using the oEmbed method – I think it uses the iframe method for Vimeo videos. (Not yet for YouTube). Here’s how to do it.

    Thread Starter mfuchs

    (@mfuchs)

    oEmbed works but with oEmbed I can’t customize the output such as video size or overlay colors… 🙁

    Moderator Kathryn Presner

    (@zoonini)

    oEmbed works but with oEmbed I can’t customize the output such as video size or overlay colors… 🙁

    You can set the size in Settings > Media > Maximum embed size

    You could also try an iframe plug-in.

    webvitaly

    (@webvitaly)

    You can try iframe plugin. This plugin will help you to embed iframe with such shortcode: [iframe width="480" height="270" src="http://www.youtube.com/embed/wQL34ZiCNVA"].

    Or you can embed video into WordPress post using this shortcode: [embed width="500" height="400"]http://www.youtube.com/watch?v=wQL34ZiCNVA[/embed]. WordPress will insert iframe code automatically. Link between [embed] shortcodes is the simple link for video.
    oEmbed supports such formats:

    • YouTube
    • Vimeo
    • DailyMotion
    • blip.tv
    • Flickr (both videos and images)
    • Viddler
    • Hulu
    • Qik
    • Revision3
    • Scribd
    • Photobucket
    • PollDaddy
    • Google Vide
    • WordPress.tv (only VideoPress-type videos for the time being)
    • SmugMug (WordPress 3.0+)
    • FunnyOrDie.com (WordPress 3.0+)
    Mayorofcydonia

    (@mayorofcydonia)

    I have trouble embedding videos on my site too, some silly thing keeps prevents the videos from showing up.

    Maybe you can try this alternative to solve your problem.
    No shortcode is needed to embed your url, and it’s absolutely working for me. Sometimes, the problem is not in your functions, it’s only hosters who don’t allow external urls to be embed by default settings
    on your hosting plans.
    Thanks for the feedback if it solves your problem.

    // Enable oEmbed on a specific element
    
    add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
    add_filter( 'the_content', array( $wp_embed, 'autoembed'), 8 );

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Video embed code disappearing’ is closed to new replies.