Install and activate Meta Box and Meta Box AIO plugins.
Create this field group (JSON export) using Meta Box for your desired post type:
For the Video type field, set "Max number of files" to 1.
In the Settings tab, set the Location to your desired post type.
Edit your Pages and populate the field for each.
Let's create a function for use with a Dynamic Data condition to ensure that the video Section gets output only on Pages that have the field populated.
Install and activate a code snippets plugin like WPCodeBox 2.
Create a new PHP snippet.
Title: Check if the given Meta Box group is empty
This is a premium members-only content.
To view the rest of the content, please sign up for membership ($47/month or $599 one-time).
Already a member? Log in below or here.