• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nSiteful Web Builders

Building a Better Web - One Site at a Time.

  • Home
  • About
    • Testimonials
    • Resources
  • Web Sites
  • Online Marketing
  • WordPress Support
    • Customized WordPress Training
    • 60-for-60 Sessions
  • Web Applications
  • Blog
    • Archive Listing Minimalistic
    • Blog Articles Grouped by Category
    • Case Studies
    • General
    • Portfolio
    • Reviews
    • Snippets
    • Techniques
  • Contact Jeff
    • Purchase Retainer Consulting Hours
    • About Retainer Consulting Hours

By Jeff Cohan, May 1, 2012

How to embed a YouTube Video in WordPress

Here are the basic tried-and-true steps for embedding a YouTube video into a WordPress Blog post or page, as of this writing. It also applies to embedding videos from several other video servers.

Method #1: The Original Way: Embed Code

Prior to version 2.9 of WordPress, this was how you had to do it. This method still works, and it arguably gives you the most control over how a video renders on the page.

  1. Click the “Share” button under the video at YouTube.
  2. Click the “Embed” button. This opens up a bunch of choices.
  3. You can choose any of the dimension sets whose width is less than or equal to the maximum width for your Blog’s layout. Alternatively, you can enter that width in the “Width” box in the “Custom” section. The appropriate height dimension will be entered automatically.
  4. You can leave all the checkboxes (“Show suggested…”; “Use HTTPS…”, etc.) unchecked.
  5. Copy (to your clipboard) the embeddable code in the box. It begins with “<iframe…”.
  6. Now go to your blog entry and edit it.
  7. (This is important:) Click on the HTML tab. Paste the code from your computer clipboard into your post where you want the video to appear. (It won’t work if you paste it into the edit box while in Visual mode.)
  8. Save/update the post, and Voila!

Method #2: The New Way: Just the URL!

WordPress – since version 2.9 – can take a standard URL of a video on any of several supported video servers (16 at this writing) and automatically convert it to the appropriate embed code. To use this method, do be sure to enable “Auto-embeds” in Administration > Settings > Media SubPanel.

Using this method, here’s what you’d enter…

http://www.youtube.com/watch?v=o3_QlggyV_E

…to get this…

Method #3: The Shortcode Way

You can wrap the URL in the WordPress “embed” shortcode. This will have the same result as Method #2, with a few differences:

  • the URL does not have to be on its own line
  • the “Auto-embeds” setting need not be enabled
  • you can slightly customize the video by setting a maximum (but not fixed) width and height; e.g., [embed width="123" height="456"]...[/embed]

If you want, check out the official WordPress Codex page about Embeds.

Related Posts

  1. Shorten Your WordPress Slugs (Permalinks)
  2. Add Dynamic Table of Contents to a Series of WordPress Posts
  3. Why I Love Firebug for Firefox
  4. What are WordPress Post Formats, and why should I care?
  5. How to Reuse Content in WordPress with the amr shortcode any widget Plugin
  • Choose the best match.

Written by Jeff Cohan · Categorized: Snippets · Tagged: Embedding, WordPress, YouTube

  • Choose the best match.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

mailchimp signup

Subscribe to get notified when new articles are published. Unsubscribe any time. No spam. I promise. Check out my newsletter archives.

social

Twitter Facebook LinkedIn

Recent Articles

  • How to Create a Simple Custom Events Plugin May 24, 2022
  • Make your Web Site the Heart & Hub of your Online Marketing Strategy March 24, 2022
  • Why SiteGround Hosting? March 11, 2022
  • Tent Birth and Breastfeeding Services January 31, 2022
  • Trello Board Tour: Jeff’s Blogging Board January 30, 2022

Filter By Category/Tag

Categories

  • Case Studies (7)
  • General (61)
  • Portfolio (5)
  • Reviews (12)
  • Snippets (15)
  • Techniques (35)

Popular Tags

Advanced Custom Fields Blogging BlueHost Child Themes Content Marketing CSS Customer Service Custom Fields Custom Post Types Diagnostics Facebook FooGallery Genesis HTML Images iPhone Libra Live Chat Marketing Media MemberPress mu-plugins MySQL online strategy Photo Gallery php Pinterest Plugins Post Formats Pricing Project Management SEO Seth Godin Shortcodes Social Networking Surveys Taxonomies Trello Twitter Video Web applications Web design Web forms WooThemes WordPress

siteground wp hosting

Web Hosting

wp101

EasyWordPresstutorialvideosforbeginners.
MemberPress CTA

Footer

Background

Web Sites | WordPress Support | Web Applications.

Formally trained in liberal arts and education (I have a B.A. in Government from Harvard and studied Secondary Education at Rutgers Graduate School), I have honed my skills in the communication arts and sciences as a teacher, trainer, instructional designer, writer, photographer, calligrapher, helpdesk manager, database programmer, and multimedia developer.

(I've also been a group counselor, waiter, bartender, bicycle messenger boy, computer salesman, carpenter's helper, financial analyst, and school board president.)

Tech

Systems since 1983.
Web sites since 1994.
PHP since 2001.
WordPress since 2007.

Contact

770-772-5134
Email Jeff
Send Money
All Ways

Copyright 2022, nSiteful Web Builders, Inc.

Subscribe

Pardon the interruption. I know popups can be annoying. But I’d love to have you as a subscriber.

Sign up to be notified when new articles are published. Unsubscribe any time.

* indicates required

Powered by MailChimp

×