Beaver Builder

Bread crumbs / Will Be / Placed / Here / When Available

What This Feature Does

Beaver Builder allows theme or plugin developers to package and register custom layout templates so that site users can select them directly from the Beaver Builder template library. This removes the need to import .dat files manually through the WordPress importer.

Workflow Overview

1. Prepare Your Template Source

  • Maintain a central source site containing your .dat templates.
  • When a user selects a template in Beaver Builder, associated media (images/videos) is referenced (linked) from this source site, rather than imported to the user’s WordPress instance.
  • If you do not host the media externally, templates will still work, but the media files will not load for users.

Best practice: Host templates on a stable URL (for example, a multisite demo location) so that media links remain accessible.

2. Create Custom Templates

  • Create your layouts in Beaver Builder.
  • Save any reusable rows, layouts, or modules that you want users to access.

3. Categorize and Add Images

  • In the Beaver Builder admin panel inside WordPress:
    • Assign each saved template to a category.
    • Add a featured image that will visually represent the template in the selector.
  • Categorization and images help users find and understand templates more efficiently.

Note: This categorization process does not apply to saved rows or modules.

4. Export Templates to a .dat File

  1. Log in to the WordPress admin dashboard.
  2. Go to Tools > Template Exporter.
  3. Select the templates you want to export.
  4. Click Export template data. This generates a templates.dat file.

If the Template Exporter option is missing:

  • Go to Settings > Beaver Builder > User Access.
  • Enable Template Data Exporter for appropriate user roles.
  • Save and retry the export.

5. Register Templates in Code

To distribute templates, you must register the exported .dat file within a theme or plugin.

Register within a Theme

Use the full path or get_stylesheet_directory() to register the templates file:

FLBuilder::register_templates( get_stylesheet_directory() . "/templates.dat" );

Best practice is to wrap the registration in a function hooked to after_setup_theme that checks for Beaver Builder’s availability.

Example:

function my_theme_load_bb_templates()
{
if ( ! class_exists( "FLBuilder" ) || ! method_exists( "FLBuilder", "register_templates" ) ) {
return;
}
FLBuilder::register_templates( get_stylesheet_directory() . "/templates.dat" );
}
add_action( "after_setup_theme", "my_theme_load_bb_templates" );

Registering in a theme means templates will only be available when that theme is active.

Register within a Plugin

If you want templates to persist regardless of the active theme, include the same registration code inside a plugin instead.

6. Verify Installation

  • Activate the theme or plugin that contains your registered templates.dat file.
  • Open any page in Beaver Builder.
  • Your templates should appear under the Templates tab with their categories and preview images.

Saved rows and modules will appear under the Saved tab in the content panel.

Things to Know Before You Begin

Template Creation Restrictions

  • Exporting templates to .dat files requires at least the Standard (paid) version of Beaver Builder.

Module Compatibility

  • If a custom template uses modules that are not available in the user’s version (for example, premium modules in a Lite environment), those modules will not render for users.

Recommendation: When creating templates for wide distribution, consider providing or recommending custom modules where necessary.

Global Content

  • Global rows, modules, and columns are exported as standard items and will not retain global relationships when registered.