In Danland Theme - How to remove hyperlink on the site name?

Comments

komal.savla’s picture

Hi,
To remove the hyperlink on the sitename, Replace the following code in the page.tpl.php :

<?php if ($site_name || $site_slogan) : ?>
  <div id="branding-wrapper">
     <?php if ($site_name) : ?>
	<?php if ($is_front) : ?>
	  <h1 class="site-name"><a href="<?php print $base_path ?>" title="<?php print $site_name ?>"><?php print $site_name ?></a></h1>
	 <?php endif; ?>
     <?php if (!$is_front) : ?>
     <h2 class="site-name"><a href="<?php print $base_path ?>" title="<?php print $site_name ?>"><?php print $site_name ?></a></h2>
     <?php endif; ?>
<?php endif; ?>

With this:

<?php if ($site_name || $site_slogan) : ?>
  <div id="branding-wrapper">
     <?php if ($site_name) : ?>
	<?php if ($is_front) : ?>
	  <h1 class="site-name"><?php print $site_name ?></h1> // Modified this line to remove the <a> tag
	 <?php endif; ?>
     <?php if (!$is_front) : ?>
     <h2 class="site-name"><?php print $site_name ?></h2> // Modified this line to remove the <a> tag
     <?php endif; ?>
<?php endif; ?>

Also add the following style in your .css file

h2.site-name, h1.site-name {
    color: #005A8C;
}

Thanks,
Komal

danpros’s picture

Status: Active » Fixed

Thanks Komal,

Yes just remove the anchor tag.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.