Skip to content

Instantly share code, notes, and snippets.

@Lego2012
Last active February 5, 2020 05:25
Show Gist options
  • Save Lego2012/64f5bdfc2fd4ff373a7584ca24be08b5 to your computer and use it in GitHub Desktop.
Save Lego2012/64f5bdfc2fd4ff373a7584ca24be08b5 to your computer and use it in GitHub Desktop.
Add an ID to .site-inner #wordpress #genesis
<?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