Video (YouTube)

Embedding a YouTube video is easy on your LibPress site!

Instructions: place its URL into the content area. Make sure the URL is on its own line and not hyperlinked (clickable when viewing the post). The URL will turn into a an embed and provide a live preview in the visual editor. Review the coding examples below for help.

Youtube code example:
Check out this cool video:
https://www.youtube.com/watch?v=Kk8oDwV-5hM&t=3105s
That was a cool video.

The Youtube or Vimeo link must be in the form http://youtube.com… or http://vimeo.com… and not youtu.be or some other variant. If you have a shortened YouTube URL (e.g. http://youtu.be…), view the link. The URL should change at the top of your browser to the http://youtube.com version – this is the long version that you want to paste into the Editor.

 

Advanced Code

Another option is to wrap the URL in the “embed” Shortcode in the Text view of the Edit Page screen (won’t work in the Visual view).

// NOTE: Remove space between ‘[‘ and ’embed’ when you try.
[ embed width="123" height="456"]http://www.youtube.com/watch?v=Kk8oDwV-5hM&t=3105s[/embed]

Note: Applying width and height will work to resize the embed of Youtube videos, but not Google Docs.

If WordPress fails to embed the URL, the post will contain a hyperlink to the URL.

data-preview-alt=”TEXT”