Erros CSS Less
I’m not able to put the Image URL in the Background to work with the Background CSS
widget.php
function get_less_variables( $instance ) {
$odometer_background = $instance['odometer_background']; ...default.less
@odometer_background_img: default; background: url(@odometer_background_img) center center no-repeat; ...
It only works if you put it in style=””
default.php
$odometer_background_img = siteorigin_widgets_get_attachment_image_src( $odometer_background_img, 'full' )[0];
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
2Hi Luccas,
Thanks for reaching out. This is a known technical limitation with variables and the recommended solution is to add the image using inline CSS – the solution you mentioned at the bottom of your post. This doesn’t appear to be documented in our developer docs and I’ll rectify that shortly.
Kind regards,
Alex
Perfect,
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.