Skip Navigation

Resolved

Reported for: WPML Multilingual CMS 4.6.0

Resolved in: WPML 4.6.5

Topic Tags: Compatibility

Overview of the issue

If you are using a Beaver Themer Layout for a post and then translate that post, the layout only works for the original language post. The translated post displays the default layout instead.

Workaround

Please be sure to make a full backup of your site before proceeding.

    1. Open the …/wp-content/plugins/bb-theme-builder/classes/class-fl-theme-builder-frontend-edit.php file.
    2. Locate the following code snippet on line 167.
static public function is_content_building_enabled( $post_id = null ) {
		return 'content' === self::get_edit_mode( $post_id );
}
  1. Replace it with the following code snippet:
    static public function is_content_building_enabled( $post_id = null ) {
    		// WPML Workaround for compsupp-6652
    		if (class_exists('SitePress')) {
    			if ( self::get_edit_mode( $post_id ) == '' ) {
    				return true;
    			}
    			/* This also works:
    			return 'layout' != self::get_edit_mode( $post_id ); 
    			*/			
    		}
    		
    		return 'content' === self::get_edit_mode( $post_id );
    	}
    

Alternatively, you can set the _fl_theme_builder_edit_mode custom field to Copy and then edit each post separately.