WordPress.org

Ready to get started?Download WordPress

Forums

How do I put my youtube video in my blog (10 posts)

  1. taryek
    Member
    Posted 4 years ago #

    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?

  2. buddha trance
    Member
    Posted 4 years ago #

    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/

  3. BluePlanetAlmanac
    Member
    Posted 4 years ago #

    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?

  4. buddha trance
    Member
    Posted 4 years ago #

    @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."

  5. BluePlanetAlmanac
    Member
    Posted 4 years ago #

    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' );
    
    }
    
    ?>
  6. buddha trance
    Member
    Posted 4 years ago #

    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.

  7. BluePlanetAlmanac
    Member
    Posted 4 years ago #

    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.

  8. buddha trance
    Member
    Posted 4 years ago #

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

  9. BluePlanetAlmanac
    Member
    Posted 4 years ago #

    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.

  10. buddha trance
    Member
    Posted 4 years ago #

    Glad it worked out!

Topic Closed

This topic has been closed to new replies.

About this Topic