WordPress.org

Support

Support » How-To and Troubleshooting » How do I put my youtube video in my blog

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)
  • buddha trance

    @buddha-trance

    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
    http://wordpress.org/extend/plugins/vipers-video-quicktags/

    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:

    [youtube]http://www.youtube.com/watch?v=MLc6i29yhDM&NR[/youtube]

    A possibility, from the faq page:
    http://wordpress.org/extend/plugins/vipers-video-quicktags/faq/

    “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.”

    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,

    <?php
    /**
     * Loads the WordPress environment and template.
     *
     * @package WordPress
     */
    
    if ( !isset($wp_did_header) ) {
    
    	$wp_did_header = true;
    
    	require_once( dirname(__FILE__) . '/wp-load.php' );
    
    	wp();
    
    	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.

    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.

    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.
Skip to toolbar