WordPress.org

Ready to get started?Download WordPress

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.

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 change back to the Youtube video player?

WordPress 3.9 and later uses the native WordPress video player to play your Youtube videos.

If you don't want that and use the default Youtube video player instead, you can use this line in a plugin or theme:

add_filter( 'youtube_profile_field_use_native_player', '__return_false' );

Requires: 3.6 or higher
Compatible up to: 3.9.2
Last Updated: 2014-4-23
Downloads: 7,506

Ratings

3 stars
3.7 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