Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created September 18, 2015 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/c0710faf639c27188892 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/c0710faf639c27188892 to your computer and use it in GitHub Desktop.
Check if the child theme is accessible with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Check if the child theme is accessible with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-a11y/
*/
add_action( 'genesis_entry_content', 'rtug_semantic_headings' );
function rtug_semantic_headings() {
if ( genesis_a11y( 'headings' ) )
echo '<h3>Semantic Heading</h3>';
else
echo '<h4>Non-Semantic Heading</h4>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment