Last active
February 5, 2020 05:25
-
-
Save Lego2012/64f5bdfc2fd4ff373a7584ca24be08b5 to your computer and use it in GitHub Desktop.
Add an ID to .site-inner #wordpress #genesis
This file contains 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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Add an ID to .site-inner | |
add_filter( 'genesis_attr_site-inner', 'custom_attributes_content' ); | |
function custom_attributes_content( $attributes ) { | |
if ( is_singular('post' ) ) { | |
$attributes['id'] = 'site-inner'; | |
} | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment