This tutorial page assumes you’re using a shortcode based WP editor. Please refer to other integration options.
Shortcode
Using the [automatic_youtube_gallery]
shortcode, you can quickly add YouTube video galleries directly in your POST/PAGE.
Example Usage
- Playlist:
[automatic_youtube_gallery type="playlist" playlist="PLAYLIST_ID"]
- Channel:
[automatic_youtube_gallery type="channel" channel="CHANNEL_ID"]
- Username:
[automatic_youtube_gallery type="username" username="YOUTUBE_USERNAME"]
- Search:
[automatic_youtube_gallery type="search" search="SEARCH_KEYWORD"]
Shortcode Attributes
- type: YouTube source type. Accepted values are “playlist”, “channel”, “username”, “search”, “videos” and “video”.
- playlist: YouTube Playlist ID or URL. Required when
type="playlist"
. - channel: YouTube Channel ID or URL.
Required when type="channel"
. - username: YouTube Username. Required when
type="username"
. - search: Search keyword. Example: cartoon, sports. Required when type=”search”.
- video: YouTube video URL. Required when
type="video"
. - videos: Comma (,) separated list of YouTube video URLs or IDs. Required when
type="videos"
. - order: Order Videos by. Applicable only when
type="search"
. Accepted values are “date”, “rating”, “relevance”, “title” and “viewCount”. - limit: Maximum number of videos that will appear in this gallery. Set to 0 for the maximum amount (500).
- cache: Specifies how frequently (seconds) the plugin should check your YouTube source for any new update. Possible values are “900”, “1800”, “3600”, “86400”, “604800” and “2419200”. Enter “0” to make new API calls every time.
The following attributes are specific to the “thumbnail gallery” part of the output,
- theme: Accepted values are “classic”, “popup”, “slider” and “playlister”. All options other than the “classic” are only supported in our PRO version.
- columns: Number of columns you like to have in the gallery. Maximum of “12”.
- per_page: Number of videos to show per page. Maximum of “50”.
- thumb_ratio: Thumbnail ratio. Accepted values “0” – “100”. Example: “56.25”, “75”, “100”, etc.
- thumb_title: “1” or “0”. Show/Hide the video title in each gallery item.
- thumb_title_length: Number of characters you like to show in the title. Add “0” to show the whole title.
- thumb_excerpt: “1” or “0”. Show/Hide the short description of a video in each gallery item.
- thumb_excerpt_length: Number of characters you like to have in the video excerpt. Set “0” to show the whole description.
- pagination: “1” or “0”. Show/Hide the pagination.
- pagination_type: “pager” or “load_more”.
The following attributes are specific to the “player” part of the output,
- player_ratio: Player ratio. Accepted values “0” – “100”. Example: “56.25”, “75”, “100”, etc.
- player_title: “1” or “0”. Show/Hide the current playing video title on the bottom of the player.
- player_description: “1” or “0”. Show/Hide the current playing video description on the bottom of the player.
- autoplay: “1” or “0”. Specifies whether the initial video will automatically start to play when the player loads.
- autoadvance: “1” or “0”. Specifies whether to play the next video in the list automatically after previous one end.
- loop: “1” or “0”. In the case of a single video player, plays the initial video again and again. In the case of a gallery, plays the entire list in the gallery and then starts again at the first video.
- controls: “1” or “0”. Show/Hide the video player controls.
- modestbranding: “1” or “0”. Lets you prevent the YouTube logo from displaying in the control bar. Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user’s mouse pointer hovers over the player.
- cc_load_policy: “1” or “0”. Show captions by default, even if the user has turned captions off. The default behavior is based on user preference.
- iv_load_policy: “1” or “0”. Show/Hide the annotations.
- hl: Player Language. Specifies the player’s interface language. Set the field’s value to an ISO 639-1 two-letter language code.
- cc_lang_pref: Default Captions Language. Specifies the default language that the player will use to display captions. Set the field’s value to an ISO 639-1 two-letter language code.