Skip to content

Instantly share code, notes, and snippets.

@SiGaCode
Created May 27, 2015 09:47
Show Gist options
  • Save SiGaCode/9f50db8b215a9be2c9f8 to your computer and use it in GitHub Desktop.
Save SiGaCode/9f50db8b215a9be2c9f8 to your computer and use it in GitHub Desktop.
Use genesis_attr to add inline styles via ACF
// Add background-color to .footer-widgets
add_filter( 'genesis_attr_footer-widgets', 'ap_attributes_footer_widgets' );
function ap_attributes_footer_widgets( $attributes ) {
$background = get_field('footer_widgets_bg', option);
$attributes['style'] = 'background-color:' . $background . ';';
return $attributes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment