To add a new demo to Avada Builder library add fusion_builder_get_demo_pages filter to your theme or plugin.
Applied to Avada Builder demos library. Useful for removing or adding demos to the library.
Copy to Clipboardfunction fusion_builder_add_my_demo( $demos ) {
$demos['my_demo'] = array (
'category' => 'My Demo',
'pages' => array (
array (
'name' => 'Homepage',
'page_template' => 'default',
'content' => 'Page Content Goes Here',
),
array (
'name' => 'About',
'page_template' => 'default',
'content' => 'Page Content Goes Here',
),
),
);
return $demos;
}
add_filter( 'fusion_builder_get_demo_pages', 'fusion_builder_add_my_demo' );x 1function fusion_builder_add_my_demo( $demos ) {23$demos['my_demo'] = array (4 'category' => 'My Demo',5 'pages' => array (6 array (7 'name' => 'Homepage',8 'page_template' => 'default',9 'content' => 'Page Content Goes Here',10 ),11 array (12 'name' => 'About',13 'page_template' => 'default',14 'content' => 'Page Content Goes Here',15 ),16 ),17);1819return $demos;2021}2223add_filter( 'fusion_builder_get_demo_pages', 'fusion_builder_add_my_demo' );