-
-
Save freezvd/742ce00542df374c2927 to your computer and use it in GitHub Desktop.
Add classes and attributes to any element in Genesis
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
| <?php | |
| //* Add class to .site-container | |
| add_filter('genesis_attr_site-container', 'jive_attributes_st_container'); | |
| function jive_attributes_st_container($attributes) { | |
| $attributes['class'] .= ' st-container'; | |
| return $attributes; | |
| } | |
| //* Add class to .site-inner | |
| add_filter('genesis_attr_site-inner', 'jive_attributes_st_inner'); | |
| function jive_attributes_st_inner($attributes) { | |
| $attributes['class'] .= ' st-pusher'; | |
| return $attributes; | |
| } | |
| //* Add class to .sidebar-wrap | |
| add_filter( 'genesis_attr_content-sidebar-wrap', 'jive_attributes_st_content' ); | |
| function jive_attributes_st_content( $attributes ) { | |
| $attributes['class'] = $attributes['class']. ' st-content'; | |
| return $attributes; | |
| } | |
| //* Add class to .content | |
| add_filter( 'genesis_attr_content', 'jive_attributes_st_content_inner' ); | |
| function jive_attributes_st_content_inner( $attributes ) { | |
| $attributes['class'] = $attributes['class']. ' st-content-inner'; | |
| return $attributes; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment