• family-reflections

    (@family-reflections)


    Using the Minimalism Theme. I’ve replaced blog title and description with my custom logo. I’d like to make the logo clickable and for it to be a link to my home page.

    I’ve combed the threads on this topic and nothing has worked yet.

    Page:
    https://famreflections.com/blogs

    Code in header.php that you might want to know about:

    <div id="header">
     <div id="headerimg">
       <h1>
        </a><a>">
           <?php bloginfo('name'); ?></a>
       </h1>
         <div class="description">
           <?php bloginfo('description'); ?>
         </div>
      </div>
    </div>

    thank you for tolerating yet another one of these questions

Viewing 11 replies - 1 through 11 (of 11 total)
  • Mark Ratledge

    (@songdogtech)

    The original code should work, since you kept the original image name in CSS:

    <div id="header">
    	<div id="headerimg">
    		<h1>
                       <a href="<?php echo get_option('home'); ?>/">
                         <?php bloginfo('name'); ?></a>
                     </h1>
    		<div class="description">
                       <?php bloginfo('description'); ?>
    		</div>
    	</div>
    </div>
    Thread Starter family-reflections

    (@family-reflections)

    Sorry, I replaced the code that I posted with the code you offered and nothing changed.

    I’ve sent new logo images to my ftp, thinking I might have a corrupted image file.

    I’ve tried to make the whole banner clickable to no avail.

    I’ve tried to make a transparent clickable box surrounding the image but the box wouldn’t move or resize.

    Any other ideas?

    Mark Ratledge

    (@songdogtech)

    The wrong code still shows in your site’s source; sure you put it in index.php, single.php and page.php?

    You’ve got some sort of combination of WordPress and an iWeb site going, with links going between both sites, some of which 404. You need to get that sorted out, too.

    Thread Starter family-reflections

    (@family-reflections)

    Thank you for looking into it more deeply.

    I switched the code back after I tried it and I didn’t see that it worked.

    Also the page and site are still under development, hence the broken links. And I’m building my site in iWeb and my blog sits in an iFrame. That full page is here: https://famreflections.com/Blog.htm

    I’ll switch it back to your new code so you can take a look if you’d like.

    Thread Starter family-reflections

    (@family-reflections)

    Anyone have any more ideas?

    jonimueller

    (@jonimueller)

    I use this in my sites, with the CSS calling the images for the banner, I put this in my header.php file:

    <div id="banner" onclick="window.location.href='https://www.yourdomain.com/'" style="cursor: pointer;"></div>

    Of course change the division to whatever division class or id calls your header/banner graphic, and substitute your own domain name.

    Thread Starter family-reflections

    (@family-reflections)

    Thank you jonimueller, that’s the closest I’ve gotten yet!

    If I wanted to make the link open in a new window (target=”top”) where would I add that in the above code. I’ve tried a few places and none worked yet.

    Also, this method seems to have moved my blog down away from the logo. Where would I go to edit the code necessary to bring the blog back up, snug under the logo.

    thanks again

    Thread Starter family-reflections

    (@family-reflections)

    What would I insert into jonimueller’s code to have the link open in a new window?

    And what do I edit to move the blog closer up underneath the banner?

    its not target="top" its target="_blank"

    Where do you post that line of code within the header.php?
    Doesn’t seem to work for me. I’m using WPFolio for my theme. Do I need to change “banner” or just the domain in the code?
    Thank you

    Hi, I also desperately lookinh for the answer to Family Reflections and josharris. The code below worked for me, but where do we add the target=”_blank” in order for the link to open in a new window?

    <div style=”banner” onclick=”window.location.href=’https://www.yourdomain.com/'&#8221; style=”cursor: pointer;”></div>

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Clickable Header Image. Logo As External Link.’ is closed to new replies.