Community Forums › Forums › Archived Forums › General Discussion › Cannot Make Header-Image clickable
Tagged: header image, site title
- This topic has 6 replies, 4 voices, and was last updated 8 years, 11 months ago by
Brad Dalton.
-
AuthorPosts
-
February 10, 2017 at 11:49 am #200923
mweb
MemberHello, I have tried both the background url method and adding the custom header code to functions.php and doing it through Appearance -> header.
When I do it through Appearance -> header, the image doesn't show up at all.
site is http://visitposeycounty.com
The Visit Posey County image in the upper left is the header image.
Any help appreciated.
http://visitposeycounty.comFebruary 10, 2017 at 2:30 pm #200931Victor Font
ModeratorYou've added the header image to title link's parent element instead of the title link itself. Whatever you added to functions.php is coded incorrectly.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 10, 2017 at 3:55 pm #200934mweb
MemberThanks, but can you provide a bit more of a hint?
This is where it's probably gone wrong:
// Sets up Custom Header
remove_action( 'genesis_header', 'genesis_do_header' );
add_action( 'genesis_header', 'genesis_do_new_header' );function genesis_do_new_header() {
echo '<div>';
do_action( 'genesis_site_title' );
echo '</div>';echo '<div class="fp-nav-menu">';
echo '<div class="genesis-nav-menu">';
do_action( 'genesis_header_right' );
dynamic_sidebar( 'header-right' );
echo '</div>';
echo '</div>';
}Embarrassingly, I don't remember why I did it that way. I was very new to Genesis, and WordPress, then. Now, even if I take it all out, clicking the image still doesn't do anything.
February 10, 2017 at 4:16 pm #200936Victor Font
ModeratorHeader images are added through the WordPress customizer. genesis_site_title creates the link. Not sure what you're trying to accomplish, but there are other ways to do this in Genesis.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 10, 2017 at 4:38 pm #200939mweb
MemberThanks, yes I'm aware that there are other ways to do this. I just don't know how, which is why I'm asking.
I'm trying to get a header that looks like the current one, but with the logo being clickable.
February 11, 2017 at 2:16 am #200947Getwhatsappstatus
MemberGreat resource of knowledge going here.
Thanks
February 12, 2017 at 2:36 am #200980Brad Dalton
ParticipantWhat theme are you using?
Try and add support for a custom header using PHP code
//* Add support for custom header add_theme_support( 'custom-header', array( 'flex-height' => true, 'width' => 1200, 'height' => 200, 'header-selector' => '.site-title a', 'header-text' => false, ) );
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.