WordPress.org

Plugin Directory

Youtube Profile Field

Automatically display your latest Youtube videos on your site. Comes with the shortcode [youtube-user] to be used in posts and pages.

So, how is this different from the Youtube oEmbed feature that's already in WordPress?

The built-in feature is awesome if you want to show a specific video. But what if you always want to show your latest video? Or 3 latest videos? You could manually update them each you upload a new video, or you could use this plugin to take care of it for you.

How do I use the shortcode?

The shortcode is: [youtube-user]

You can use these parameters:

  • count - The number of videos you want to show. You can use 'all' to show all that the Youtube feed contains. Defaults to the plugin setting. Ex: [youtube-user count="2"]
  • user - The ID of the user you want to show videos from. Default is the post author. Ex: [youtube-user user="3"]
  • width - If you want a different width than the default.

How do I use the template tag?

You can use one of the following templates tags:

// Return the videos
if ( function_exists( 'ypf_get_video' ) ) {
    echo ypf_get_video();
}

// Echo the videos
if ( function_exists( 'ypf_show_video' ) ) {
    ypf_show_video();
}

Both accepts the same array of parameters.

You can use these parameters:

  • user_id - The ID of the user you want to show videos from. Required outside the loop.
  • count - The number of videos you want to show. You can use 'all' to show all that the Youtube feed contains. Defaults to the plugin setting.
  • width - If you want a different width than the default.
  • headingStart - Text or HTML before the video title. Defaults to the plugin setting.
  • headingEnd - Text or HTML after the video title. Defaults to the plugin setting.

Example:

if ( function_exists( 'ypf_get_video' ) ) {
    echo ypf_get_video( array( 'count' => 2, 'user_id' => 2 ) ); // 2 videos from user ID 2
}

Can I use the native WordPress HTML5 player?

Yes, you can use the native WordPress video player added in WordPress 3.9 to play your Youtube videos.

The option has been disabled because of issues playing the videos in Safari and Firefox. But if you still want to, you can use this line in a plugin or theme:

add_filter( 'youtube_profile_field_use_native_player', '__return_true' );

Requires: 3.6 or higher
Compatible up to: 4.4.4
Last Updated: 9 months ago
Active Installs: 300+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,2,2
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1