Hello, I discovered Site Origin recently while doing a research on page builders for an upcoming project. I have to say this is a great plugin!
I’m having trouble getting a custom group which I’ve added, following the instructions from this page:
https://siteorigin.com/docs/page-builder/widget-groups/
Adding group with a name of ‘Testing Widgets’:
if ( ! function_exists( 'testing' ) ) :
function testing( $tabs ) {
$tabs[] = array(
'title' => __('Testing Widgets', 'siteorigin-panels'),
'filter' => array(
'groups' => array('testing')
)
);
return $tabs;
}
endif;
add_action('siteorigin_panels_widget_dialog_tabs', 'testing');
Now the for next part, I have registered a widget which appears in the list of all widgets, but I could not get it to appear inside any group (I’ve tried ‘wordpress’, ‘panels’, etc). Here’s the code:
function __construct() {
parent::__construct(
'foo_widget', // Base ID
__( 'Testing', 'text_domain' ), // Name
array(
'description' => __( 'A Foo Widget', 'text_domain' ),
'panels_groups' => 'testing',
)
);
}
Am I missing something? Thanks in advance.
Sorry, forgot to mention I’m using v2.0.7 of the page builder.
Problem solved, there is an error in the documentations:
In the line:
should be:
'panels_groups' => array('testing'),Hope it helps for those having the same problem as me. Thanks.
Thanks for the note Johnny! I’ll fix up the documentation now.