- Upload the plugin files to the `/wp-content/plugins/yotuwp-easy-youtube-embed/` directory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the ‘Plugins’ screen in WordPress
- Go to menu YotuWP to set the default values for layout, player and enter your YouTube API key as well.
- Edit your page/post/custom post then click on YotuWP button to start to insert shortcode with wizard embed.
2.1 YotuWP Settings
After installation and active plugins, you see the new menu YotuWP on WordPress menu. Press on the theme to get setting panel as below:
There are some important tabs in here:
- Settings: the tab with all settings about how videos list look like, show title or description, number of columns
- Player: the tab helps you control how player display such as large one or a popup player.
- API: Your API key to grab videos
The important setting that is API key, press the API tab to set this value with the screenshot. You can follow this post to get API key easy.
After setup your default values, now go back to your page and use the wizard to insert videos.
2.2 Embed videos with YotuWP Wizard
The YotuWP provides a wizard for adding new gallery easy.
After install, go to edit your page/post and you can see the new button above editor area – YoutuWp button.
Click on the button, we got the new pop up as the screenshot below:
In this popup, There are some options for videos type. You can select one of them to add videos to your page.
Example: I select playlist type, I enter URL https://www.youtube.com/playlist?list=PLRfz0EZ69r6aFDhkeYcid5-823zaxkR8z
then press Get Info button. The YotuWP takes some seconds to get playlist info to ensure you enter right data. The playlist info display after the search.
In this result, the Step #2 Layout Settings. This is options for layout display and player mode. If you want to use the different style or player mode with the default setting, just turn off the Use Default Options.
After that, just press Insert button. After Insert button pressed, a shortcode with some param inserted to post content.
Now save your page and go to view frontend and get the result.
Use YotuWP shortcode manual
The YotuWP used based on the shortcode and we have details params of shortcode as below:
- type: The type of source videos. This time the YotuWP support: playlist, channel. Default: playlist
- id: The id of playlist or channel you want to get videos. Read more this post to get playlist/channel ID
- pagination: The option to enable/disable the pagination videos in the gallery. Values are ‘on’, ‘off’. Default: on
- template: The Layout for display videos. This setting has three values are ‘grid’, ‘list’ and ‘mix’. Default: grid
- column : The number of columns videos on the gallery. This option is just applied when you select template is ‘grid’ or ‘mix’. Default : 3
- per_page: The limit number videos per page. Default: 12
- title: This setting to enable/disable videos title in the gallery. Default: on
- description:This setting to enable/disable videos description in the gallery. Default: on
Example for grid template from a playlist with 8 videos per page, 4 columns and just show title.
[yotuwp type="playlist" id="PLlqZM4covn1H69IAGko-oNj0lubezFQms" column="4" per_page="8" title="on" description="off"]