Witness Web

970-712-6933

  • Home
  • About Me
  • Blog
  • Services
  • Testimonials
  • Portfolio
  • Contact Me
    • Add to Dropbox

Genesis Framework: Change Home Header Link

April 12, 2013 by Lee Pettijohn Leave a Comment

Working on a web design in Hermann MO for a great couple that manage two different bed and breakfasts in the same city.  They wanted to have a way to showcase both inns on the same site.  Through toils and tears I figured most of it out but I needed a way to change the home header link using the Genesis Framework.  Changing the home header link would allow me to revise the link to go to a specific page instead of back to the home page.  Luckily, I found this resource to help me out.  Thanks Jennifer.

add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
/**
 * Change default Header URL.
 * 
 * @author Jen Baumann
 * @link http://dev.studiopress.com/change-header-link.htm
 * 
 * @param string $title complete title including $wrap and $inside
 * @param string $inside contents of the $title with link and site name
 * @param string $wrap outer $title tags, may be h1 or h4
 * @return string
 */
function child_header_title( $title, $inside, $wrap ) {
	$inside = sprintf( '<a href="http://hermannmolodging.com/cat-nap-inn/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
	return sprintf( '<%1$s id="title">%2$s</%1$s>', $wrap, $inside );
}

This code that changes the home header link for the Genesis Framework worked like a charm!

Filed Under: Web Design Technical Blog Tagged With: PHP, technical, web design

About Lee Pettijohn

Lee is the Web Designer and Developer for Witness Web Design. With skills including HTML, CSS, Javascript, PHP, and Flash, he is committed to delivering the best possible product while providing excellent customer service. With a background in mathematics and business, Lee brings his expertise to the table by taking direction and making clients' visions a reality. “I feel most comfortable when working with code,” Lee says. “It’s a joy to take the ‘painted canvas’ given to me and recreate it in such a way that captures the attention of the user and creates an incredible experience.” Lee brings many skills including database management to the table, and is excited to make his customers' potential dreams...their tangible realities.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Need Help …

  • This field is for validation purposes and should be left unchanged.

Copyright © 2019 · Agency Pro Theme on Genesis Framework · WordPress · Log in