Skip to content

Instantly share code, notes, and snippets.

@srikat

srikat/functions.php

Last active Sep 24, 2016
Embed
What would you like to do?
How to remove Site Description (Site Tagline) in Genesis. https://sridharkatakam.com/how-to-remove-site-description-tagline-in-genesis/
add_filter( 'genesis_attr_site-description', 'abte_add_site_description_class' );
/**
* Add class for screen readers to site description.
*
* Unhook this if you'd like to show the site description.
*
* @since 1.0.0
*
* @param array $attributes Existing HTML attributes for site description element.
* @return string Amended HTML attributes for site description element.
*/
function abte_add_site_description_class( $attributes ) {
$attributes['class'] .= ' screen-reader-text';
return $attributes;
}
// Add class for screen readers to site description
add_filter( 'genesis_attr_site-description', 'genesis_attributes_screen_reader_class' );
// Remove the site description
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
/* ## Screen Reader Text
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
border: 0;
overflow: hidden;
}
.screen-reader-text:focus,
.screen-reader-shortcut:focus {
clip: auto !important;
height: auto;
width: auto;
display: block;
font-size: 1em;
font-weight: bold;
padding: 15px 23px 14px;
color: #333;
background: #fff;
z-index: 100000; /* Above WP toolbar. */
text-decoration: none;
box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
}
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.