How to filter Less on child theme
Hi,
I’m trying to change the default color for buttons in the button widget. I’m running vantage with a child theme, and thought I could do something like this in the child theme’s `functions.php`:
function ms_filter_sow_button_less( $less, $instance, $widget ) {
$less = str_replace('button_color: #41a9d5;',
'button_color: #cecece;', $less);
return $less;
}
add_filter('siteorigin_widgets_less_sow-button', 'ms_filter_sow_button_less',
10, 3);But … nothing happens. Am I misunderstanding something?
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi Cwrichardson,
I recommend changing the default color of the button color setting itself. This can be done by using siteorigin_widgets_form_options_sow-button. The button color can be accessed via $form_options[‘design’][‘button_color’]
You could also override LESS variables directly by using siteorigin_widgets_less_variables_WIDGET_SLUG.
Kind regards,
Alex
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.