Creating and managing templates in Divi 5 ensures consistency and efficiency across your website.
This article covers creating global templates, assigning custom templates to specific pages, and best practices for streamlining workflow.
Set Up Site-Wide Templates (Headers, Footers, Body)
Divi 5 allows you to create global templates that apply across your site. This ensures consistency and saves time by managing layouts from one place.
Go to Divi → Theme Builder in the WordPress dashboard.
Click Add Global Header (1), Add Global Body (2), or Add Global Footer (3).
Select Build Global Header or Add From Library if you have such a layout saved to your Divi Library.
Use the Divi Builder to customize the template.
Click Save to apply changes globally.
Note: Unlike other templates, the Default Website Template doesn't require building a Global Body.
Create and Assign a Template
Go to Divi → Theme Builder.
Click Add New Template.
Choose Build New Template.
Choose All Posts to apply the template.
Click Create Template and customize it using the Visual Builder.
Save and exit.
Notes:
In the above example, the template was assigned to All Posts.
The Custom Body section should always contain the Post Content module.
Exclude a Template
You can exclude a template from the application, which is useful when you want it assigned to all published pages but not to a specific selection.
Click Add New Template.
Choose Build New Template.
Choose All Posts to apply the template.
Click on the Exclude From tab.
Choose your exclusion selection.
Click Create Template and customize it using the Visual Builder
Save and exit.
For example, you can create a template and assign it to All Posts; while using the Exclude From tab, you can choose which published posts the template should be excluded from.
Macro Assignments and Micro Assignments
Templates can be assigned on a macro level and/or micro level. For instance, you can apply a template to every page on your site (macro level), an individual post (micro level), or both.
Resolving Conflicts When Multiple Templates Apply
If you assign a template to a page already assigned to another template, the newly saved template will take precedence, and the previous assignment on the other template will be removed.
A warning message will appear notifying you of this before saving the template.
Best Practices for Using the Divi Theme Builder
Plan your template structure before creating it to avoid unnecessary revisions.
Organize templates properly by labeling them clearly for easy management.
Keep backups of your templates by exporting them regularly.
Test across devices to ensure consistent display and responsiveness.