Created
May 27, 2015 09:47
-
-
Save SiGaCode/9f50db8b215a9be2c9f8 to your computer and use it in GitHub Desktop.
Use genesis_attr to add inline styles via ACF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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