Last active
December 3, 2019 07:11
-
-
Save topleague/0ad00439e490c73dcacb768a313b942e to your computer and use it in GitHub Desktop.
Adding Classes and Attributes to HTML elements 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
// Adding Classes and Attributes to HTML elements in Genesis | |
// Courtesy: https://wpbeaches.com/adding-attribute-html-section-genesis/ | |
//* Add class to .entry | |
add_filter( 'genesis_attr_entry', 'susanta_animate_entry' ); | |
function susanta_animate_entry( $attributes ) { | |
$attributes['class'] = $attributes['class']. ' animate-entry fadeUp'; | |
return $attributes; | |
} | |
//* Add class to .sidebar-wrap | |
add_filter( 'genesis_attr_content-sidebar-wrap', 'susanta_animate_sidebar_wrap' ); | |
function susanta_animate_sidebar_wrap( $attributes ) { | |
$attributes['class'] = $attributes['class']. ' animate-sidebar-wrap fadeUp'; | |
return $attributes; | |
} | |
//* Add class to .entry-content | |
add_filter( 'genesis_attr_entry-content', 'susanta_animate_entry_content' ); | |
function susanta_animate_entry_content( $attributes ) { | |
$attributes['class'] = $attributes['class']. ' animate-entry-content fadeUp'; | |
return $attributes; | |
} | |
//* Add class to .site-inner | |
add_filter('genesis_attr_site-inner', 'susanta_animate_site_inner'); | |
function susanta_animate_site_inner($attributes) { | |
$attributes['class'] = $attributes['class']. ' animate-site-inner fadeUp'; | |
return $attributes; | |
} | |
//* Add class to .content | |
add_filter('genesis_attr_content', 'susanta_animate_content'); | |
function susanta_animate_content($attributes) { | |
$attributes['class'] = $attributes['class']. ' animate-content fadeUp'; | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment