Toolset allows you to add any post field to any Divi Module. There are two ways to display post fields:
- Using a Text Module: simply display the fields you want using Toolset styling. Use this approach if, for example, you want to display a Google Map field.
- Using any other Modules: use fields as arguments for Divi Modules. Use this approach if, for example, you want to create a button and use fields to control the button text and URL to which it links.
If you press Enter on your keyboard while inserting a field into a Divi module, the insertion will likely not work. This happens because Divi features keyboard shortcuts and pressing Enter saves and closes Divi module dialog. When this happens, Toolset is unable to insert a shortcode into a closed module dialog. This is an edge case but if necessary, as a workaround, try not pressing Enter while inserting shortcodes into Divi modules.
- Insert a Divi Text Module and click on the Fields and Views button to insert a field. If you want to insert a form, click on Toolset Forms.
- The Fields and Views shortcodes dialog opens. Select the field you want and select additional options for it if needed. Click the Insert shortcode.
- The field you selected was inserted into the Text Module.
- In our example, we insert a Button Module.
- On the top bar of the WordPress administration display, click on Toolset Shortcodes -> Fields and Views.
- Select the field you want to display from the Fields and Views shortcodes dialog.
- We select the Post URL field. Next, click on the Create shortcode button.
- The shortcode is automatically generated and can be copied and pasted to any location you want, including to any Divi module.
- In our example, we paste it into the Button URL field of the Button Module.
- Using the same method, we insert the Post title field into the Button Text of the Button Module.
The Divi Builder now includes a button that uses the URL and text from two custom fields.