Skip to content

Instantly share code, notes, and snippets.

@seothemes
Created May 15, 2018 03:15
Show Gist options
  • Select an option

  • Save seothemes/7949fd7aa352d3e6adffbc4367c76978 to your computer and use it in GitHub Desktop.

Select an option

Save seothemes/7949fd7aa352d3e6adffbc4367c76978 to your computer and use it in GitHub Desktop.
Adds ontouchstart attribute to body in Genesis.
<?php
// Do not include opening PHP tag.
add_filter( 'genesis_attr_body', 'custom_add_ontouchstart_to_body' );
/**
* Add ontouchstart attribute to body.
*
* @param array $atts Body attributes.
* @return array
*/
function custom_add_ontouchstart_to_body( $atts ) {
$atts['ontouchstart'] = ' ';
return $atts;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment