Hi,
I’m creating a custom widget since the website I am working needs something very specific. I needed to add a button inside my widget and I am unsure if there’s a way to apply the button template directly and not have to manually create a new structure for the button using the values from the saved array.
I saw the same question was asked here: https://siteorigin.com/thread/including-the-template-of-a-widget-within-a-widget-template/ but the answer doesn’t clarify anything for me, or perhaps I am not understanding it.. I think actually the file has changed since then because it seems to be pointing to a nonexistent line number.
In my custom widget I am adding the button in the $form_options like so:
'more_button' => array( 'type' => 'widget', 'label' => __( 'Button Widget', 'widget-form-fields-text-domain' ), 'class' => 'SiteOrigin_Widget_Button_Widget', 'hide' => true )
then in my template file I can see the values inside the array by using
var_dump( $more_button );but I would like to use the same template that’s generally used for the button included in the SiteOrigin Widget Bundle, if possible. How can I do this?