Skip to main content

Displaying a Video on Your Posts

This guide explains how to add and display videos on your posts using Divi Machine and Advanced Custom Fields (ACF). It covers both self-hosted videos and videos hosted on platforms like YouTube or Vimeo.

Self-Hosted Videos

Step 1: Create a File Field in ACF

Create an ACF field with the type set to File.

Add an upload field in ACF

Step 2: Upload Your Video

For each post, upload a video file via the ACF field or select it from the Media Library.

Step 3: Add the ACF Item Module

In your Single Post layout, add the ACF Item module.

  1. Set the ACF Field Name to your file field.
  2. Under the Other Field Settings tab:
    • Toggle Is Video to Yes.
    • Upload a Thumbnail Image (optional but recommended).

Thumbnail Image setting for self-hosted video

note

The video thumbnail setting will only be shown if the Autoplay Video setting is off.

Videos Hosted on YouTube or Vimeo

Step 1: Create an oEmbed Field in ACF

Create an ACF field with the type set to oEmbed.

Add an oEmbed field in ACF

Step 2: Add the Video URL

Paste the video URL (from YouTube, Vimeo, etc.) into the oEmbed field for each post.

Step 3: Add the ACF Item Module

In your Single Post layout, add the ACF Item module.

  1. Set the ACF Field Name to your oEmbed field.
  2. Navigate to the Other Field Settings tab.
    • Toggle Is oEmbed Video to Yes.
    • Upload a Thumbnail Image (optional but recommended).

Thumbnail Image setting for oEmbed Video

note

The video thumbnail will be shown before the user plays the oEmbed video. This helps maintain visual consistency and improves loading performance.