Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
data attributes for genesis
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>

This comment has been minimized.

Copy link
Owner Author

ghost commented Jul 28, 2016

ok, I'll answer my own question:

$attributes['data-off-canvas-content'] = 'data-off-canvas-content';

actually works, albeit inelegant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.