Last active
September 20, 2016 11:35
-
-
Save danemorgan/7023034 to your computer and use it in GitHub Desktop.
Adds an ID attribute to the .main element in Genesis 2.0 HTML5. Useful for hooking into things like ajax post loaders and infinite scrollers. #genesiswp #wpfilter
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_filter( 'genesis_attr_content', 'themename_attributes_content' ); | |
| function themename_attributes_content( $attributes ) { | |
| $attributes['id'] = 'primary-content'; | |
| return $attributes; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment