Hi all,
I tried to add a theme to Button widget using this short tutorial:
https://siteorigin.com/docs/widgets-bundle/getting-started/extending-existing-widgets/
Adding new theme to the Button themes dropdown works perfectly. Unfortunately adding .less file to style the new theme is not working at all. I’ve adjusted the function to match my theme’s folder structure, so it looks like this (I haven’t changed function’s name yet ):
function mytheme_button_less_file( $filename, $instance, $widget ){ if( !empty($instance['theme']) && $instance['theme'] == 'test' ) { $filename = get_stylesheet_directory() . '/inc/siteorigin/button/button-one.less'; } return $filename; } add_filter( 'siteorigin_widgets_less_file_sow-button', 'mytheme_button_less_file', 10, 3 );
and the .less file:
@font_size: 5em;
.ow-button-base { a { font-size: @font_size; } }
Is there anything wrong with changes I made?
PS: All default themes work perfectly (XAMPP, Windows 10).