Skip to main content

Build Custom Templates Using the Theme Builder in Divi 5

Learn how to build custom templates with the Theme Builder in Divi 5 so your headers, footers, and page layouts stay consistent and automatic.

Updated this week

The Theme Builder in Divi 5 is the place where you design templates for your entire website.

A template controls the header, body, and footer for a group of pages, posts, products, or other content types.

You build these areas with the Visual Builder, just like any other page, and assign them to all or part of your site.

Divi 5 uses the same Theme Builder concept as previous versions, but now you can combine it with newer tools like Loop Builder and advanced Dynamic Content to create more powerful templates.

What the Theme Builder is

The Theme Builder is an interface inside Divi that lets you:

  • Create templates made of Header, Body, and Footer layouts

  • Assign those templates to specific content (all posts, certain pages, product categories, search results, 404 page, and more)

  • Use the Visual Builder, modules, and Dynamic Content to design each part of the template

Each template has three areas:

  • Header: your site or page header (logo, menu, CTA, contact info, etc.)

  • Body: the main content area (post content, custom layouts, loops)

  • Footer: your site footer (links, credits, newsletter, etc.)

You can create one global template that covers the entire site, plus extra templates that override it for specific parts of the site when needed.

When it makes sense to use the Theme Builder

Use the Theme Builder in Divi 5 when you want:

  • A custom global header and footer instead of the default theme header and footer

  • A unique layout for all blog posts (or for posts in certain categories)

  • Custom templates for WooCommerce products and product categories

  • Unique templates for portfolio items, events, or other custom post types

  • Custom layouts for special pages like search results and the 404 page

⚠︎ Important Note: Avoid using Theme Builder to build individual Page Layouts.

You can still build one-off pages with the Visual Builder alone, but Theme Builder is the right choice any time you want one layout to apply automatically to many items.

How to access the Theme Builder

Divi 5 - Open the Theme Builder

To open the Theme Builder:

  1. Go to your WordPress dashboard.

  2. In the sidebar, click the Divi option.

  3. Click the Theme Builder.

You will see:

  • A Default Website Template (your global template)

  • A list of any custom templates you create

  • Controls to add, edit, duplicate, export, and delete templates

From here you can:

  • Add new templates for specific content

  • Edit the Header, Body, or Footer for each template using the Visual Builder

  • Manage where each template applies with Assign settings

Understanding template assignments

Each Theme Builder template has assignment rules:

  • Default Website Template (global default)

  • Specific post types (All Posts, All Pages, All Projects, All Products, etc.)

  • Specific items (single pages or posts you pick)

  • Archives (categories, tags, authors, search, and more)

  • WooCommerce pages and product archives if WooCommerce is active

You can also exclude locations from a template. When templates overlap, Divi uses a priority system so more specific templates override more general ones. For example:

  • A template for All Posts

  • Another template for Posts in Category: Guides

Posts in Guides will use the category template, while other posts use the "All Posts" template.

Managing Template parts

Each Template part, such as the Header, Body, and Footer, has the following options

  • - Click on the Pencil icon to edit the selected template part (header, body, or footer)

  • - Click on the Trash icon to delete the selected template part (header, body, or footer)

  • - Click on the Eye icon to toggle the selected template part's (header, body, or footer) visibility. If a template part is set to not be visible, it will not show on the front end; you can still edit it in the Theme Builder.

Step-by-step: create a global header and footer

This example sets up a site-wide header and footer using Theme Builder.

  1. From your WordPress Dashboard, click on the Divi → Theme Builder.

  2. In the Default Website Template box, click Add Global Header.

    Divi 5 - Create a Global Header Template

  3. Choose Build Global Header. Divi opens the Visual Builder.

    Divi 5 - Build the Global Header Template

  4. Design your header:

    • Add a Section and Row

    • Insert a Menu module, Logo (Image module or Site Logo), and maybe a Button module for a CTA

    • Use Dynamic Content for the site title or tagline if needed

  5. Click the Save(1) button in the Visual Builder to save your changes and the Exit(2) button to return to the Theme Builder.

    Divi 5 - Save and Exit the theme builder template

Next, build the Global Footer:

  1. In the same Default Website Template, click Add Global Footer.

  2. Choose Build Global Footer.

  3. Design your footer:

    • Add navigation links, contact info, copyright text, social icons, etc.

    • Use Dynamic Content for the current year, site name, and menu items where useful

  4. Save and exit.

Now every page that does not use a more specific template will inherit this header and footer automatically.

Step-by-step: create a custom blog post template

This example creates a template for all blog posts.

  1. From your WordPress Dashboard, click on the Divi → Theme Builder.

  2. Click the Add New Template option.

    Divi 5 - Add New Template

  3. Choose Build New Template option.

  4. In the assignment pop-up, check the All Posts option.

    Divi 5 - Assign the new template

  5. Click the Create Template button.

    Divi 5 - Build a new theme builder template

Build the Body layout:

  1. In your new template box, click Add Custom Body and then choose Build Custom Body.

    Divi 5 - Build the Body of the new template

  2. In the Visual Builder, design the body:

    • Add a Section and Row

    • Insert a Post Title module at the top

    • Add a Post Content module where you want the main article content to appear

    • Author box, or newsletter signup, below the content

  3. Save and Exit the builder.

⚠︎ Important Note: The Post Content is very important in this context, since it will be used to display your actual post's content.

Optionally, add a custom header and footer just for this template:

Tips:

  • If you already have a Global Header/Footer created, those will be automatically assigned to the new Template (All Posts)

  • You can:

    • Right-click on Global Header/Footer and choose Disable Global. This will turn the Header/Footer into static, and you can make changes to them using the layout from Global Header/Footer as a starting point.

    • Click the Trash icon to delete the Global Header/Footer from the All Posts template and build a new local Header/Footer. Those will only be used on all of your posts.

  1. In the template box, click Add Custom Header if blog posts should use a different header than the global one.

  2. Do the same for Add Custom Footer if needed.

From now on, all blog posts use this layout, and you only edit the template when you want to change the design.

Step-by-step: create a WooCommerce category template with Loop Builder

Theme Builder and Loop Builder work especially well together for product archives.

  1. From your WordPress Dashboard, click on the Divi → Theme Builder.

  2. Click the Add New Template option to create a new template.

  3. In the assignment pop-up, select:

    1. All Product Category Page - template will be assigned to all WooCommerce product category pages

    2. Specific Product Category Pages and select the specific product category to which the template should be applied. You can also select multiple product categories.

  4. Click the Create Template button.

Build the Body layout:

  1. Click the Add Custom Body option and choose Build Custom Body.

  2. In the Visual Builder:

    • Add a Section and Row

    • Inside a Column or Group, build a single product card (image, title, price, button) using regular modules

    • Turn that Column or Group into a Loop container using the Loop settings

    • In each module, use Dynamic Content fields like Loop Featured Image, Loop Product Title, Loop Product Price, and Loop Link

  3. Adjust the loop query in the Loop settings to set the Post for Current Page option in the Query Type and set how many products to show per page.

  4. Add a Pagination module below the loop and target your Loop container so visitors can move through multiple pages of products.

  5. Save and exit.

Now every WooCommerce product category will only display products assigned to each category, and the layout will be the one you just built in the All Product Category Page template's Custom Body.

Managing Theme Builder templates

Divi 5 gives you tools to keep templates organized and reusable.

In Divi → Theme Builder, you can:

Right-click on a single template

  1. Right-click on an existing template

  2. Choose:

    • Manage Template Assignments: Change the selected template assignments.

    • Reset Template Assignments: Resets all the template assignments.

    • Duplicate Template: Duplicates the selected template

    • Disable the Template: Disables the selected template. Any assignments will be ignored. This is useful, especially when you want to keep the template, but you don't want to apply it.

    • Delete Template: Deletes the selected template.

    • Rename Template: Allows you to rename the selected template.

    • Export Template: Exports the selected template.

Export/Import entire Theme Builder templates

  1. Click on the Portability icon (located in the top right corner)

  2. Choose:

    1. Export: You can export the entire Theme Builder Template collection, or you can choose which Templates you want to export by deactivating the Export All Template option and then only selecting the templates you want to export

    2. Import: You can import a JSON file containing a single or multiple templates.

Revert changes using the History tool

You can revert changes such as deleting templates, changes in template assignments, and deleting template sections: header, body, footer, and more.

⚠︎ Important note: if you make changes and then leave the Theme Builder change, the History option will not be able to revert any changes.

Clear the entire Theme Builder

Click on the Trash icon to reset the entire Theme Builder to its original state - no templates.

Save Theme Builder Set

Click on the Save Theme Builder Set icon to save your entire Theme Builder to either your local Divi Library or to your Divi Cloud account.

You can also choose to save all current templates, or choose only the ones you need by deactivating the Include All Template option and selecting only the ones you want to save.

Load Theme Builder set

Click on the Load Theme Builder Set iconto load a set of templates either from your local Divi Library or from your Divi Cloud account.

Real-world Theme Builder use cases

Here are some practical ways to use the Theme Builder in Divi 5.

  • Global site frame

    • One global template with a consistent header, footer, and content width.

    • General pages use the global body, while special templates override only what they need.

  • Blog system

    • One template for all posts.

    • Extra template for specific categories (for example, Tutorials vs News) with different layouts or sidebars.

  • WooCommerce store

    • Template for single product pages (gallery, details, related products).

    • Templates for product categories using Loop Builder.

  • Marketing pages

    • Custom template for landing pages without the normal header and footer (or with a simplified version).

    • Template for download pages or thank-you pages with specific CTAs.

  • Utility pages

    • Custom 404 page with helpful links and search.

    • Search results template with extra filters and clear result styling.

Once you get used to Theme Builder, you can shape how every part of your site looks and behaves without writing PHP or editing theme files.

Tips to avoid confusion

A few habits will keep your Theme Builder setup easy to understand:

  • Start with one global template
    Set a global header, body, and footer first, then add more specific templates only when you need them.

  • Name templates clearly
    Use names that describe both the purpose and the scope, like "Global Template", "All Posts", "Category: Tutorials", "Product: Single".

  • Keep assignments simple
    Avoid too many overlapping include/exclude rules at first. Use simple, targeted assignments so you always know why a template is being applied.

  • Use Dynamic Content in templates
    In Body layouts, rely on Dynamic Content (Post Title, Post Content, Featured Image, etc.), so templates work for every item in that scope, not just one page.

  • Combine with Loop Builder, where it makes sense
    Use Loop Builder inside Theme Builder templates for archives and grids (blog, products, directories), but keep single templates simple when you are starting out.

With these basics in place, the Theme Builder in Divi 5 becomes your main tool for giving your site a consistent structure, while still letting each part of the site use layouts that match its job.

Did this answer your question?