For those who seeking same question, this is the answer (with helpful support from Author, many thanks!)
/**
* Add Own Templates
*
* @param array $templates_list
* List of the Templates
*
* @return array
*/
function prefix_add_own_templates( $templates_list ) {
$my_templates_list = array(
array(
‘title’ => __( ‘Title of Block’, ‘text-domain’ ),/*Title*/
‘type’ => ‘block’,/*either template or block*/
‘author’ => __( ‘Author’, ‘text-domain’ ),/*Author Name*/
‘keywords’ => array( ‘about-block’, ‘about 3’ ),/*Search keyword*/
‘categories’ => array( ‘about’ ),/*Categories*/
‘template_url’ => ‘http://demo.it24.vn/oxygen/wp-content/uploads/core_buttons.json’,/*Json file url */
‘screenshot_url’ => ‘http://demo.it24.vn/oxygen/wp-content/uploads/2020/09/03.png’,/*Screenshot of block*/
‘demo_url’ => ‘http://demo.it24.vn/oxygen/’,/*Demo Url*/
)
);
return array_merge( $my_templates_list, $templates_list );
}
add_filter(‘gutentor_advanced_import_templates’,’prefix_add_own_templates’);
Hello @gianghl1983 ,
I am happy to know the issue resolved.
We have made some correction on Gutentor Adding Own Template Library documentation.
You can also look on Gutentor Template Library and made similar like this with your own templates.
Best Regards!
@codersantosh So cool! Many thanks!