Builder Responsive: Updates

From IThemes Codex
Jump to: navigation, search

A lot of effort has gone into ensuring that this Builder 4.0 will not cause issues when you upgrade an existing site that is running an earlier version of Builder.

There is a specific piece of code that needs to be in a child theme's functions.php in order to trigger the new responsive feature, so your child theme will still function as it does now after you upgrade.

Here is that code:

add_theme_support( 'builder-responsive' );

Note that there are some Builder sites that have extreme modifications. Since we don't have access to these modified child themes, we can't test with them. So, if you have a large amount of customizations through filters that affect widths, positioning, and other aspects integral to rendering a Layout, it is possible that the changes in this release can cause you some issues.

If you have a highly-customized site, we recommend keeping a backup of your existing Builder theme directory just in case. If you run into any issues after upgrading, revert to the previous version of Builder and contact us in the forum about the issue. If possible, please provide a copy of your child theme that is having the issue so that we can find a way to work around the issue.

Can I update my existing child theme to be responsive?

A big goal that we had for this release was to make it very easy to update existing child themes to be responsive. As Chris Jean mentioned here, the idea was to make it as simple as adding a line of PHP to your child theme's functions.php file.

In a way, this has been achieved. By adding a single line of PHP to your child theme’s functions.php file, you can enable Builder 4.0's responsive feature. However, what we overlooked to account for is that the old method of styling child themes create some inconsistencies as the design breaks down responsively.

Will adding this line of PHP make your existing child theme responsive? Yes; however, the styling may not take to it too well.

The best advice we can give to people is to try making the change on a test version of your site. Set up a test installation of WordPress (if you have BackupBuddy, you can use the magic migration feature to set up a mirror of your site for testing), install the latest version of Builder, add your child theme, make the modification (listed below) to the functions.php file, and test things out to see if your design is coping well with the new responsive feature.

Note that the functions.php modification can be removed to switch the child theme back to its non-responsive functionality, so trying out the feature will not do anything to prevent you from going back. If you don’t want to go to the trouble of making the test site and are comfortable with your site possibly having some style issues while you test out the new feature, you can easily remove the modification and put things back the way that they were.

If your child theme already has a functions.php file, simply add this line after the <?php line:

add_theme_support( 'builder-responsive' );

If your child theme doesn't have a functions.php, create a new file, add the following code to it, save it as functions.php, and add it to your child theme.

<?php
 
add_theme_support( 'builder-responsive' );

See also


[[Builder_Test|← Back to Builder Codex Home]

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox