This tutorial focuses on the use and customization of the video shortcodes on WordPress.com sites.
Shortcodes are abbreviated code placed into using the square brackets
[ ]. They may be added to the Visual or Text Editors.
Not all video shortcodes are alike. The shortcode needed is dependent where the video is being pulled from. Some shortcodes need the url of the video and some shortcodes only need the videos ID numbers from the host website.
In an effort to make things simple xxxx is substituted in place of a full url and zzzz in place of video ID’s for this example. You will need to supply the specifics.
Supported Video Shortcodes
- Blip.tv videos:
- CNNMoney videos:
- DailyMotion videos:
- Flickr videos:
- Hulu videos:
- TED Talks videos:
- Twitch.tv videos:
- Ustream.tv videos:
[ustream id="zzzz" live="1"]for live streams
[ustream id="zzzz"]for recorded videos
- Vimeo videos:
- Vine vidoes:
- VideoPress videos:
- YouTube videos:
- The Internet Archive videos:
It is important to note whether or not the shortcode requires quotation marks around the URL or the ID.
Step by Step Directions for YouTube
Many of these steps are similar for all the video shortcodes but please refer to the specific information regarding the exact shortcode you may be using.
Let’s go through this process step-by-step with a YouTube video and its shortcode. Please note that YouTube video links may be pasted right into the Visual or Text editor and they will automatically convert into the necessary code when the web page is generated to display the video player.
- Locate the video you wish to share.
- Note the URL and the ID (the highlighted portion of the URL)
- In the WordPress editor, place your cursor in the location you want you video to appear and ensure it is on its own line between paragraphs.
- Using the shortcode square brackets write in
- Alternatively you can use the full URL for YouTube
Your video will now appear within your post.
This video is using the default shortcode
Additional Modifications to the Video Shortcodes
Many of the shortcodes have additional modifiers, or parameters, you can placed in them to adjusting aspect of the final video such as the size, appearance, related videos and more. WordPress Support shortcodes has a list you can use to find the specific modifiers for the shortcode you are using.
Video Height and Width
To control the width or height we only need to add a “
&” and the factors we want to change.
- To control just the width add, “w=x” in pixels
- To control the height and width add “w=x&h=x”
Other Video Features
- To not show other videos, add “&rel=0”
- To use a custom starting point add “start=xx” in seconds
- To use a custom end point add “end=xx” again in seconds
All of these options can be used together to really tailor the video to your site for example.
[youtube=https://www.youtube.com/watch?v=9Tm7YQ6Awy4&rel=0&start=5&end=10&w=240&h=135] changes the video to 140px wide by 135px high that starts at 5 seconds in and stops at 10 seconds and does not show related videos. here is an example.
Add Videos in WordPress Widgets
All of these shortcodes can be used inside the Text Widget so you can place a video into the sidebar or footer on you site as well. more detailed information.
Videos can also be placed in comments. Clark WP contributor David Larson wrote an article on How to post a picture and video in a comment on WordPress.
Additional Information on WordPress Shortcodes
- WordPress Shortcodes: A Complete Guide by Smashing Magazine
- WordPress Support shortcodes
- Why You SHould Never Upload a Video To WordPress by WPBeginner