Created
July 28, 2016 16:48
-
-
Save secretstache/89296db426561bea2176e1ba02b5224e to your computer and use it in GitHub Desktop.
data attributes for 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
add_filter( 'genesis_attr_site-container', 'ssm_data_off_canvas_content' ); | |
function ssm_data_off_canvas_content($attributes) { | |
$attributes['data'] = 'data-off-canvas-content'; | |
return $attributes; | |
} | |
// this creates <div class="site-container" data='data-off-canvas-content'></div> | |
// is there a way to do something like <div class="site-container" data-off-canvas-content></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok, I'll answer my own question:
$attributes['data-off-canvas-content'] = 'data-off-canvas-content';
actually works, albeit inelegant