• I want to make my header image that is clickable in Twenty Eleven go not to my home (www.ipscell.com) but to a different link entirely.

    How do I make this change?

    Thanks
    Paul

Viewing 15 replies - 1 through 15 (of 25 total)
  • Do not edit the Twenty Eleven theme. It is the default WordPress 3.2 theme and having access to an unedited version of the theme is vital when dealing with a range of site issues.

    Create a child theme for your customisations. Once your child theme is active, we should be able to help with the customisation.

    the link is in header.php –

    however, it is not advised to edit twenty eleven directly, but rather create a child theme https://codex.www.ads-software.com/Child_Themes and make the edits there.

    copy header.php into the child theme, edit it and find:

    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">

    possibly change to:

    <a href="https://linkurl">

    Thread Starter pknoepfl

    (@pknoepfl)

    Thanks, that change worked perfectly!

    But I already made multiple edits to the Twenty Eleven Theme (just the header.php) for my site…should I start over with a fresh unedited copy and make the edits within the Child Theme?

    Or is it OK if I make no further edits?

    Thanks again!

    Paul

    you really should install a fresh twentyeleven, and make your edits in a child theme, while your edits are still fresh in your mind

    Reason being: twentyeleven is the core WP theme, a clean copy is always needed for troubleshooting WP + whenever WP is updated, if any changes are made to twentyeleven to fix/update it, there is a good chance one of the files you edited will be replaced, and your changes will be lost

    should I start over with a fresh unedited copy and make the edits within the Child Theme?

    Yes.

    Thread Starter pknoepfl

    (@pknoepfl)

    Thanks

    Hi!
    What should I do if I want the header on every different page to link to the current page instead of the startpage? ??

    Here is the site: https://www.zilloman.com

    I want for exampel the header on https://zilloman.com/byra link to https://zilloman.com/byra instead of the startpage.

    Thx!:)

    Jonathan

    You would need to start by creating a child theme for your changes. Then edit a custom copy of the parent’s header.php template file within the child theme.

    I have a child theme already with a copy of the header.php in it.
    What should I change in the header.php to get what i want? ??

    Try changing:

    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">

    to

    <a href="<?php echo get_permalink($post->ID); ?>">

    Thank you for your answer looks like it’s working.
    But not exactly like I want to.

    I also want the header to link to for exampel https://www.zilloman.com/byra if you ar in any of the subpages to Byr?.

    So if you are on https://www.zilloman.com/byra/vad-vi-gor/ and then clicking on the header it will be linked to https://www.zilloman.com/byra

    Any suggestions?

    ??

    Jonathan

    So if the Page is a child, you want it to link to the parent Page? What if it’s a Post or a Category?

    Yes exactly, if the page is a child I want the header to be linked to the parent Page. I don’t have any posts or categorys on any of the subpages?

    But do you have Posts on your site? They have to be taken into account within the code.

    Yes I have.
    Is it possible to link the header like that?
    What should I do? ??

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Twenty Eleven Header Clickable Image Link Customization Help Needed’ is closed to new replies.