Move schema markup to body element
Removes schema markup from the div#wrapper-navbar element. Re-adds the schema markup on the body element via filter.
This commit is contained in:
parent
a2bbdb0eb7
commit
7a63872671
|
@ -26,7 +26,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
<div class="site" id="page">
|
||||
|
||||
<!-- ******************* The Navbar Area ******************* -->
|
||||
<div id="wrapper-navbar" itemscope itemtype="http://schema.org/WebSite">
|
||||
<div id="wrapper-navbar">
|
||||
|
||||
<a class="skip-link sr-only sr-only-focusable" href="#content"><?php esc_html_e( 'Skip to content', 'understrap' ); ?></a>
|
||||
|
||||
|
|
|
@ -133,3 +133,18 @@ if ( ! function_exists( 'understrap_mobile_web_app_meta' ) ) {
|
|||
}
|
||||
}
|
||||
add_action( 'wp_head', 'understrap_mobile_web_app_meta' );
|
||||
|
||||
if ( ! function_exists( 'understrap_default_body_attributes' ) ) {
|
||||
/**
|
||||
* Adds schema markup to the body element.
|
||||
*
|
||||
* @param array $atts An associative array of attributes.
|
||||
* @return array
|
||||
*/
|
||||
function understrap_default_body_attributes( $atts ) {
|
||||
$atts['itemscope'] = '';
|
||||
$atts['itemtype'] = 'http://schema.org/WebSite';
|
||||
return $atts;
|
||||
}
|
||||
}
|
||||
add_filter( 'understrap_body_attributes', 'understrap_default_body_attributes' );
|
||||
|
|
Reference in New Issue