Forum Replies Created

Viewing 1 replies (of 1 total)
  • First create your layout with Page Builder, and save. It will keep the data serialized in wp_postmeta table. Copy the serialized string from database.

    Look at siteorigin-panels/siteorigin-panels.php Line:979

    // Include the current home page in the clone pages.
    	$home_data = get_option('siteorigin_panels_home_page', null);
    	if ( !empty($home_data) ) {
    
    		$layouts['current-home-page'] = wp_parse_args(
    			array(
    				'name' => __('Clone: Current Home Page', 'siteorigin-panels'),
    			),
    			$home_data
    		);
    	}
    
    	return $layouts;

    Before return $layouts, include your code:

    $layouts['post-1'] = wp_parse_args(
    				array(
    					'name' => 'My Layout',
    
    				),
    				unserialize('a:3:{s:7:"widgets";a:1:{i:0;a:5:{s:8:"headline";s:8:"Headline";s:4:"desc";s:11:"Descriptuon";s:11:"button_text";s:6:"Button";s:11:"button_link";s:4:"Link";s:4:"info";a:4:{s:4:"grid";s:1:"0";s:4:"cell";s:1:"0";s:2:"id";s:1:"0";s:5:"class";s:15:"AB_CallToAction";}}}s:5:"grids";a:1:{i:0;a:2:{s:5:"cells";s:1:"1";s:5:"style";a:5:{s:5:"style";s:0:"";s:5:"image";s:0:"";s:5:"color";s:0:"";s:6:"height";s:0:"";s:5:"video";s:0:"";}}}s:10:"grid_cells";a:1:{i:0;a:2:{s:6:"weight";s:1:"1";s:4:"grid";s:1:"0";}}}')
    			);

    Replace your copied serialized data with this sample.

Viewing 1 replies (of 1 total)