Support » Fixing WordPress » How do I put my youtube video in my blog

  • Hi There,

    I need help on putting my youtube video inside my blog. I tried copying the embed code and inserting it as a video on my blog but it comes out messy and the video don’t show. How do i put my youtube video into my blog?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The embed code pasted directly into the post text should work fine.

    Or, from the visual editor, if you click on the button that looks like a film roll, you can insert just the URL of the video there (not the entire embed code).

    There are also plugins that keep the XHTML output clean, and are considered better than the embed code.

    A good one is

    Michael Austin


    Thanks, buddha trance. Viper’s Video moves clicks from my blog to the YouTube page. Might you have suggestions about equally-good plug-ins which leave the viewer on the blog page?

    @blueplanetalmanac – Viper’s Video displays the video from within the blog post.

    example code:


    A possibility, from the faq page:

    “The videos won’t show up. Only a YouTube image or a link to the video does.

    Your theme lacks the <?php wp_head(); ?> hook. Please add it.”

    Michael Austin


    Thanks, buddha trance. I can do that but in searching I can’t find where to put the code. Is it supposed to go in the wp-blog-header.php file? That file reads,

     * Loads the WordPress environment and template.
     * @package WordPress
    if ( !isset($wp_did_header) ) {
    	$wp_did_header = true;
    	require_once( dirname(__FILE__) . '/wp-load.php' );
    	require_once( ABSPATH . WPINC . '/template-loader.php' );

    No, that’s a core file.

    Check header.php of your theme, to see if you have <?php wp_head(); ?> – if not, add it before the closing </head> tag.

    The youtube shortcode goes inside the post, together with the main text of your article.

    Michael Austin


    In the wp-admin directory I see a file, admin-header.php. Is that the file in which that hook gets put? I also see a custom-header.php file.

    See my reply above, I was editing it while your were posting, so you may not have seen it.

    Michael Austin


    Namaste, buddha trance. The trick was to find the right file. When you wrote, “…of your theme..” I got a clue to drill into the folders, found the themes folder and my theme’s name. Bingo and thanks.

    Glad it worked out!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How do I put my youtube video in my blog’ is closed to new replies.