Builder Features

From iThemes Codex
Revision as of 16:33, 17 October 2012 by Sridhar (talk | contribs)
Jump to: navigation, search


Note: The documentation in this section is not final at the moment and is a work in progress.

Starting with Builder 4.0 Builder is responsive. It means that content will automatically fit as the window is resized without showing a horizontal scrollbar.

How to make a existing Builder site responsive

1. Update Builder to the latest version by following this.

2. Edit child theme's (active theme) functions.php.

Add the following at the end before closing PHP tag (if present):

add_theme_support( 'builder-responsive' );

3. (Optional Step)

If your theme has code that makes all module wrappers full width, you might want to get rid of it and just use the following in functions.php:

add_theme_support( 'builder-full-width-modules' );

In some child themes like Acute, the old full width code will be present in lib/structure/full-width-module.php and this file will be called in functions.php like so:

require_once( dirname( __FILE__ ) . '/lib/structure/full-width-module.php' );

In such cases, full-width-module.php can be deleted and the above line can be removed from functions.php.

4. Edit child theme's style.css.

Replace all occurrences of -outer-wrapper with -

Duplicate Sidebar Widget

The Duplicate Sidebar Widget allows for easy duplication of another sidebar’s widgets simply by dropping in the Duplicate Sidebar widget and selecting the sidebar to be duplicated from the drop-down.

Widget Content

The Widget Content feature adds the use of an advanced editor to create widget content. A new Widget Content top-level menu is now on the back-end and allows for creation of widget content with the same interface as posts and pages. Once a Widget Content entry is saved, you can add the Widget Content widget to a sidebar location and select the desired Widget Content entry from the drop down to add that content to a sidebar.

Note: Since Widget Content entries are supposed to be placed as widgets in sidebars, they are not designed to have Preview functionality working. Forum topic:


Builder provides the ability to export 'Layouts and Views' and/or 'Theme Settings' and import them to another WP site running Builder.

To access this, go to WP dashboard -> My Theme -> Settings -> Import / Export (tab)



Tuesday, March 08, 2011

This new feature was announced by Chris Jean recently, and we now have a full webinar recording in which Chris walks through how to use Import/Export, step by step.

In this webinar you will learn what the feature does, when you might want to use it, and when it makes more sense to use BackupBuddy. Chris also reviews all the other changes he incorporated into Builder 2.8.0.

All iThemes Builder users should watch this video, especially those of you involved in web design and development as a career.

View the video here ==>

Custom Module Styles


Builder provides the ability to select a custom style for a module when the module is being edited in Layout Editor. The name of custom module style and corresponding CSS class are defined in child theme's functions.php.

Custom Module Styles are present by default in these child themes: Americana and its color variants, Blueprint, Ionic and its color variants, Classen, Encased.

Custom Module Styles can also be easily added to other Builder child themes.


Objective: To set a custom style to a specific image module so that the module's wrapper (which is full width by default in Americana) gets blue background that matches the image background.

The screenshot below shows how the site appears before we create and apply the custom style to the image module (top most in the layout):


Step 1

Editing child theme's functions.php.

builder_register_module_style( 'image', 'Blue Background (full width)', 'image-blue');

has been added in it_builder_loaded() function.

if ( ! function_exists( 'it_builder_loaded' ) ) {
	function it_builder_loaded() {
		builder_register_module_style( 'widget-bar', 'Blue (full width)', 'widget-bar-blue' );
		builder_register_module_style( 'navigation', 'Subnav Blue', 'subnav-blue' );
		builder_register_module_style( 'html', 'Blue Background', 'html-blue' );
		builder_register_module_style( 'footer', 'White Footer', 'footer-white');
		builder_register_module_style( 'image', 'Blue Background (full width)', 'image-blue');
	add_action( 'it_libraries_loaded', 'it_builder_loaded' );

Step 2

Editing child theme's style.css.

	Alternate: Blue background (full width)
.image-blue-outer-wrapper {
	background: #1e3240;

has been added.

It is important to note the difference in the class name: .image-blue-outer-wrapper, not just image-blue.


Step 3

Editing the layout, then editing the image module, applying the style named "Blue Background (full width)", saving the module and finally the layout.


The screenshot below shows how the site looks after our custom style has been applied to the image module:


More Examples


Custom Widget Styles

Builder provides a easy way to apply a style (Ex.: "Yellow Background") to a widget. This style's CSS (Ex.: "background: yellow;") is to be defined in style.css for a selector whose name is defined in functions.php.



  1. Only the Widget Content widget supports this option currently
  2. The support is already built into Builder, but like the Module Styles, the option will not appear unless the child theme provides some Widget Styles. Since none of the child themes do this yet, the option does not appear by default.

If you want to start using this in your own child themes with the realization that it will be limited to Widget Style widgets, you can add code like the following to your child theme's functions.php file:

if ( ! function_exists( 'custom_register_widget_styles' ) ) {
    function custom_register_widget_styles() {
        builder_register_widget_style( 'Style Name 1', 'css-class-1' );
        builder_register_widget_style( 'Style Name 2', 'css-class-2' );
        // Keep adding new Widget Styles as needed for your application
    add_action( 'it_libraries_loaded', 'custom_register_widget_styles' );

Then all you'll need to do is change "Style Name 1" and "Style Name 2" to be the names you want for the Widget Styles and "css-class-1" and "css-class-2" to be the classes you want to be applied for each Widget Style. Simply call "builder_register_widget_style" and provide a name and class for each Widget Style you wish to add.


The above code has been added before the closing PHP tag in functions.php of BuilderChild-Blueprint theme.


Screenshots at Appearance -> Widgets before and after adding the above code:

The following has been added at the end of theme's style.css:

.css-class-1 {
	background: yellow !important;

or we can write more specific CSS like the following to avoid using !important:

.builder-module-sidebar .css-class-1 {
	background: yellow;

Screenshots of how the site appears before and after doing the above:

Henceforth any widget content widget that should get a yellow background can simply be set this style "Style Name 1" at Appearance -> Widgets.

Analytics and JavaScript Code

Builder makes it very easy to enter Google Analytics ID and custom JavaScript code that you might want to enter in <head> and/or just above </body> sections.


Note: After entering Google Analytics ID in Builder settings,

1. it might take a day or two for Google Analytics to show tracking data in your account.

2. when page source of site is viewed,

UA- number doesn't print directly in the page.

We can see code similar to

<script type='text/javascript'>
(function() {
var bsl=document.createElement('script');
var se=document.getElementsByTagName('script')[0];se.parentNode.insertBefore(bsl,se);

Above code loads wp-content/uploads/it-file-cache/builder-core/script.js file which is where the Builder-generated scripts are.