Generate: Dynamic Elements: YouTube Video

Overview

The YouTube Video shortcode inserts a video link from YouTube into the content for each generated Page.

Shortcode displaying as a link on the generated Page? Ensure that your Theme or Page Builder is using WordPress’ built in filters for rendering content and oEmbeds.

Adding: Classic Editor / TinyMCE

To add a YouTube video within the Classic Editor:

  • Click the YouTube icon in the Visual Editor toolbar:
    Page Generator Pro: Generate: Shortcodes: TinyMCE Toolbar Button

Adding: Gutenberg

To add a YouTube video within Gutenberg:

  • Click the plus icon between two existing blocks, or towards the top left corner of the Gutenberg editor
    Page Generator Pro: Generate: Dynamic Elements: Gutenberg: Add Block
  • Start typing YouTube into the Search for a block field, and click the YouTube option that appears within the Page Generator Pro section
    Page Generator Pro: Generate: Dynamic Elements: YouTube: Search Blocks
  • Follow the Configuration section below for each of the fields displayed in the right hand sidebar’s block panel:
    Page Generator Pro: Generate: Dynamic Elements: YouTube: Sidebar

Adding: Page Builders

To add a YouTube video within any Page Builder that supports a Text Editor widget/module using the Classic Editor (sometimes known as TinyMCE), refer to the Classic Editor instructions above.

Refer to the Dynamic Elements Documentation for details specific to your Page Builder.

If your Page Builder does not provide a Text Editor widget/block that uses the Classic Editor, you can still use Dynamic Elements.  However, you’ll need to manually build the shortcode, inserting it into your Page Builder’s content – for example:

[page-generator-pro-youtube parameter="value" ...]

Parameter Accepted Value Description
term string or keyword The search term(s) to use to search YouTube videos.
location string or keyword Optionally specify where the video is based.  This is used in conjunction with the Term above, so if we wanted to show an image of a building in Birmingham, UK, use Birmingham, UK

Configuration

Page Generator Pro: Generate: Shortcodes: YouTube: TinyMCE Modal

  • Term: Enter a search term.  For example, to display an image of a building, use building
  • Location (optional): Optionally specify where the video is based.  This is used in conjunction with the Term above, so if we wanted to show an image of a building in Birmingham, UK, use Birmingham, UK

Shortcode not working? Consider removing the location option to provide a broader resultset, from which a video can be used.