Last active
September 24, 2016 23:39
-
-
Save srikat/fc0100c127c3e149a31c to your computer and use it in GitHub Desktop.
How to remove Site Description (Site Tagline) in Genesis. https://sridharkatakam.com/how-to-remove-site-description-tagline-in-genesis/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add class for screen readers to site description | |
add_filter( 'genesis_attr_site-description', 'genesis_attributes_screen_reader_class' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove the site description | |
remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ## 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