-
-
Save bryanwillis/1adeabc36da192d21360 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