• Resolved mapBaker

    (@mapbaker)


    All,

    I’m trying to change the target link of the header image, but having no luck.

    My wordpress site is located at http://www.mysite.com/content

    However, I want the user to be directed to http://www.mysite.com when they click the header image, as I’m using a bootstrap front page (because I like the layout tools, etc.)

    I’m using the TwentyTwelve theme, and have already tried changing general settings > wordpress address AND site address, with huge problems:

    -Changing the ‘wordpress address’ immediately signs me out of my site, and gives me a ‘page not found’ when I try to go to my /wp-admin/ page. Trying to type in the URL myself re-directs me to a ‘page not found’ loop that I cannot get out of.

    – Changing the ‘site address’ breaks a bunch of other stuff though I can’t remember fully what happens, it does not solve this problem.

    (Note the above 2 points are taken mostly from memory, as I’ve broken at least 2 sites trying to accomplish this seemingly small task.)

    Does anyone have any other information on fixing this?

    Thanks!

    -m

Viewing 3 replies - 1 through 3 (of 3 total)
  • You will need to start customising the theme’s header.php template file via a child theme.

    Thread Starter mapBaker

    (@mapbaker)

    Thank you, @esmi!

    I see this in my header.php:

    <?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

    …but wondering how a child theme – which seems to be only CSS? – could help?

    Or can I create a child header.php?

    Just trying to figure out how this might work…

    Thanks!

    -m

    A child theme allows you to modify ANY part of the theme – so you would put a copy of the header.php file in the child theme and modify that copy of it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I change the link target of the header image?’ is closed to new replies.