Jump to content

Logo Not Linking to Home Page


tbalogh

Recommended Posts

Hi everyone!

 

I cannot for the life of me figure out how to link the logo my website to our home page. My code is below. Could you tell me what I'm missing? When I use just the regular text option, it links just fine. Just not as an image. I'm using Joomla with a Gavick template.

 

Thank you!

<div id="gk-nav" class="clearfix<?php if( !(GK_LOGIN || GK_REGISTER || GK_TOOLS || $this->countModules('search'))) : ?> top_offset<?php endif; ?>">
  <?php if ($this->getParam('logoType')=='image'): ?>
  <h1 class="logo"><a href="index.php" title="<?php echo $this->sitename(); ?>"><span><?php echo $this->sitename(); ?></span></a></h1>
  <?php else : ?>
  <div class="logo-text">
    <h1><a href="index.php" title="<?php echo $this->sitename(); ?>"><span><?php echo GK_LOGO; ?></span></a></h1>
    <p class="site-slogan"><?php echo GK_SLOGAN;?></p>
  </div>
  
  <?php endif; ?>
  <div id="gk-mainnav" class="clearfix">
    <?php if (($gkmenu = $this->loadMenu())) $gkmenu->genMenu ($this->getParam('startlevel',0), $this->getParam('endlevel',-1)); ?>
    <?php if ($this->hasSubmenu() && ($gkmenu = $this->loadMenu())) : ?>
    <div id="gk-subnav" class="clearfix">
      <?php $gkmenu->genMenu(1); ?>
    </div>
    <?php endif;?>
  </div>
</div>
<ul class="no-display">
  <li><a href="<?php echo $this->getCurrentURL();?>#gk-content" title="<?php echo JText::_("Skip to content");?>"><?php echo JText::_("Skip to content");?></a></li>
</ul>

 

MOD EDIT:

 . . . 

tags added.

Link to comment
https://forums.phpfreaks.com/topic/227387-logo-not-linking-to-home-page/
Share on other sites

1) When posting code, please enclose it within the forum's

 . . . 

BBCode tags.

 

2) This is probably a css/html issue. You'll need to examine the html source and make sure it's correct to determine that.

if you mean the logo image in the upper left hand corner, that image is part of the background CSS and as part of the background of an object is not linkable.

 

the link code is this, which is essentially 'invisible nothing':

<h1 class="logo"><a href="/index.php" title=""><span></span></a></h1>

 

there are some options including:

1. pull the image out of the background CSS and into the page as an actual image instead of using it as background. (best idea)

2. place a clear rectangular image over the background and link via the clear image.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.