Most customer who purchase our Divi Dynamic Helper plugin are probably at least somewhat familiar with custom fields. If you are not, that’s okay, this guide will give you an overview of custom fields in Divi and WordPress which will lay the foundation for using our plugin.
There are two main ways you can enable custom fields for your site. In this guide, you will learn the basics of each type of custom fields.
- WordPress Built-In Custom Fields (limited)
- WordPress Plugin (advanced)
The default built-in custom fields function is limited and will work for some things, but not for others. For example, it would work okay with video or audio, but for the gallery you would need to use a plugin. The plugins also provide a much easier to use interface for managing custom fields, so we recommend using a plugin.
Each of the other documentation guides related to the Video, Audio, Gallery, and Map modules give more information about which custom fields are supported in each module. Please refer to those guides for more details.
This video and full written guide below will show you step by step how to set up the custom fields. If you already have your custom fields set up, then you are ready to move on to the other guides and get started using the plugin.
Built-In Custom Fields
WordPress comes with a built-in custom fields feature. However, the feature is disabled by default, so you may not even know about it! These built-in custom fields are limited in features compared to plugins, but they work fine for basic needs. You can enable these in four basic steps from any page or post as shown in the screenshot below.
- In the top right corner, click the three dots menu.
- Click on “Preferences” at the bottom of the panel.
- A popup will appear. Click on “Panels” in the tabs on the left.
- Enable the toggle for “Custom Fields.”
After completing those 4 steps, the custom fields panel will appear below the content editor area on the page like shown in the following screenshot:
Note that turning this setting on once on any page will enable it on all pages and posts across your site, which is great.
To create a new custom field, click the “Enter new” button.
- Create a Name. This is a descriptive label for your own reference. You will see this name later when connecting a Divi module to the custom field.
- Add a Value. This is the actual content, such as a URL to a video or an audio file.
- Click the Add Custom Field button to create the field.
The screenshot below shows an example of how it could look after adding audio and video fields. Notice you can also use the buttons to delete or update each custom field.
Custom Field Plugins
Choose A Custom Field Plugin
When you need a more robust system of custom fields, like when using some features in our plugin for the gallery or maps, you will need to install a custom field plugin. This screenshot is what you will probably see when you do a search in the WordPress repository:
Some popular plugins include Advanced Custom Fields, Pods, Meta Box, Toolset, and others. We recommend Advanced Custom Fields for the best experiences, especially with the gallery and maps. As mentioned before, each of the other documentation guides related to the Video, Audio, Gallery, and Map modules give more information about which custom field plugins are supported for each module. Please refer to those guides for more details. For the remainder of this guide, we will use Advanced Custom Fields as the example.
Set Up The Custom Fields
Here are the steps to create a new custom field with the ACF plugin:
- Install and activate the Advanced Custom Fields plugin
- Create a Field Group
- Add a new field
- Write a Field Label
- Set the Field Type – this will depend on which module and data you are using. In this example, we will demonstrate video and audio, so choose the Url field type.
Assign The Field Group Location
The other main step is to assign the Field Group to your pages or posts. The interface allows you to assign rules which determine on which pages or posts these custom fields will appear. There are many scenarios of options to choose, and this will depend entirely on your setup and goals.
Add Content To The Custom Fields
Once the fields are all set up, and the Field Group is assigned, you can go to the page or post and add content to the custom fields. The screenshot below shows an example of how it could look after adding audio and video fields.