Last active
June 6, 2016 14:28
-
-
Save studiopress/5706694 to your computer and use it in GitHub Desktop.
Genesis header.
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
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Modify the header URL - XHTML Version | |
add_filter('genesis_seo_title', 'sp_seo_title', 10, 3); | |
function sp_seo_title($title, $inside, $wrap) { | |
$inside = sprintf( '<a href="http://www.yourdomain.com" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') ); | |
$title = sprintf('<%s id="title">%s</%s>', $wrap, $inside, $wrap); | |
return $title; | |
} |
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
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Modify the header URL - HTML5 Version | |
add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 ); | |
function child_header_title( $title, $inside, $wrap ) { | |
$inside = sprintf( '<a href="http://example.com/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) ); | |
return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $wrap, $inside ); | |
} |
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
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* 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
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Remove the site title | |
remove_action( 'genesis_site_title', 'genesis_seo_site_title' ); |
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
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Remove the header right widget area | |
unregister_sidebar( 'header-right' ); |
I am trying to delete the orange box (which used to hold a title) that remains above the full-width Nameplate I have added to Metro. I tried this:
//* Remove the site title
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
and it didn't seem to do anything.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want change the header-url on a category template. I'm using a logo in the header instead of the site title for the link. Can you show how this would work for a header logo?