Media · Gutenberg

Video Section block for WordPress

Featured video section with headline, description, play button and optional stat strip below.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Featured video section with headline, description, play button and optional stat strip below.

Inspector panels on this block: Video Source, Layout & Display, Content, Stats, Stat. Those titles come from index.js, not from a shared template.

Behavior controls: “Video type” options: Self-hosted, YouTube, Vimeo; “YouTube Video ID” (e.g. dQw4w9WgXcQ from the URL); “Vimeo Video ID” (e.g. 148751763 from the URL); “Aspect ratio” options: 16 / 9, 4 / 3, 21 / 9, 1 / 1.

Where to find it

Gutenberg inserter → Media → search “Video Section” (block name `blockenberg/video-section` in block.json). Style it in the sidebar after insert.

How to use Video Section block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Video Section”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Video Source. Set “Video type”, “YouTube Video ID”, “Vimeo Video ID”, “Video URL (.mp4)”.
  4. Check the published page. The view script reads HTML data attributes: data-video-type, data-video-url, data-vimeo-id, data-youtube-id. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Video typeSelect control; the chosen value is saved on the block. Options: Self-hosted; YouTube; Vimeo. block.json default: youtube. Saved as `videoType`.
YouTube Video IDText field in the inspector. e.g. dQw4w9WgXcQ from the URL. Saved as `youtubeId`.
Vimeo Video IDText field in the inspector. e.g. 148751763 from the URL. Saved as `vimeoId`.
Video URL (.mp4)Text field in the inspector. Saved as `videoUrl`.
Aspect ratioSelect control; the chosen value is saved on the block. Options: 16 / 9; 4 / 3; 21 / 9; 1 / 1. block.json default: 16/9. Saved as `aspectRatio`.
Play button styleSelect control; the chosen value is saved on the block. Options: Circle; Square; Pill. block.json default: circle. Saved as `playButtonStyle`.
Play button size (px)Numeric range control in the inspector. Range 48–120. block.json default: 72. Saved as `playButtonSize`.
Video max width (px)Numeric range control in the inspector. Range 400–1400. block.json default: 900. Saved as `maxWidth`.
Border radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 16. Saved as `borderRadius`.
Video shadowOn/off toggle in the inspector. On by default. Saved as `showShadow`.
Text alignmentSelect control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: center. Saved as `textAlign`.
Show content blockOn/off toggle in the inspector. On by default. Saved as `showContent`.
Show badgeOn/off toggle in the inspector. On by default. Saved as `showBadge`.
Badge textText field in the inspector. block.json default: Watch Now. Saved as `badge`.
Headline tagSelect control; the chosen value is saved on the block. block.json default: h2. Saved as `headlineTag`.
Show stats stripOn/off toggle in the inspector. On by default. Saved as `showStats`.
ValueText field in the inspector.
LabelText field in the inspector.
Padding top (px)Numeric range control in the inspector. Range 0–200. block.json default: 64. Saved as `paddingTop`.
Padding bottom (px)Numeric range control in the inspector. Range 0–200. block.json default: 64. Saved as `paddingBottom`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Video Section block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Video Section”. It sits under Media. After insert, open Video Source and set “Video type”, “YouTube Video ID”, “Vimeo Video ID”, “Video URL (.mp4)”.

What makes Video Section different from other Blockenberg blocks?

Featured video section with headline, description, play button and optional stat strip below. Inspector labels on this block include “Video type”, “YouTube Video ID”, “Vimeo Video ID”, “Video URL (.mp4)”.

Is the Video Section Gutenberg block free?

Yes. Video Section ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Video Section to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Video Source, Layout & Display, Content, Stats).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Video Section from the Gutenberg inserter.

Get Blockenberg