Skip to main content

Make The Blog Header Non Clickable

Everybody has their own idea how they want their blog.

Not everybody wants the blog title to link back to the main page at all, while some folks would like to have the title link back to the main page even when the main page is displayed.

The default Blogger code enables a link in the blog header, when anything but the first segment of the main page (aka "home" page) is displayed. Some people would like the link completely disabled, on all segments. Others would like the link enabled, on all segments.

Some folks don't like the way the title changes colour - in many blogs, the "links" (unvisited links) and "visited links" have colours that stand out from the text. Look below - see the purple and blue text? Those are links. If you don't like the title to colour itself, you remove the links - or replace the title with a picture - as I have done above.

In most of my blogs, I could do without the clickable title, completely, as I have my Menu Bar, which includes a "Home" link.

For some blogs, removing the link, in the blog title, is a fairly simple change.

Blogs that use text in the header (including text over a picture) contain code that's reasonably easy to tweak. Blogs that use a custom image in the header, with no text, are slightly more challenging.

This is done under the layout template editor. First, (yes, again!) back up the template. Next, "Expand Widget Templates" and look in the body, for
    <b:if cond='data:blog.url == data:blog.homepageUrl'>
    <data:title/>
    <b:else/>
    <a expr:href='data:blog.homepageUrl'><data:title/></a>
    </b:if>

To disable the link completely, change all of that to one simple line.
     <data:title/>

To enable the link, completely, change all of that to one alternately simple line.
     <a expr:href='data:blog.homepageUrl'><data:title/></a>

Blogs that use only an image in the header contain some more complex code to display the image. They include the link in all pages, without any checking for the home page.
      <!--Show the image only-->
      <div id='header-inner'>
        <a expr:href='data:blog.homepageUrl' style='display: block'>
          <img expr:alt='data:title' expr:height='data:height' expr:id='data:widget.instanceId + "_headerimg"' expr:src='data:sourceUrl' expr:width='data:width' style='display: block'/>
        </a>
        <!--Show the description-->
        <b:if cond='data:imagePlacement == "BEFORE_DESCRIPTION"'>
          <b:include name='description'/>
        </b:if>
      </div>
Here, the only choice is to remove the link, if you wish.
      <!--Show the image only-->
      <div id='header-inner'>
        <img expr:alt='data:title' expr:height='data:height' expr:id='data:widget.instanceId + "_headerimg"' expr:src='data:sourceUrl' expr:width='data:width' style='display: block'/>
        <!--Show the description-->
        <b:if cond='data:imagePlacement == "BEFORE_DESCRIPTION"'>
          <b:include name='description'/>
        </b:if>
      </div>

Save, and test. And (yes, yet again) backup the template.

>> Top

Comments

3dimensons said…
Did you test it before posting this solve ????????? It is totally useless .......
Chuck said…
Did you test it before posting this solve ?????????

Yes, I did test it.
thank you ! its really helpful for me !
Shyam Sundar said…
Thank you, exactly what I needed.
ben rubin said…
Wonderful!

so far so good,

thanks for sharing

Popular posts from this blog

Stats Components Are Significant, In Their Own Context

One popular Stats related accessory, which displays pageview information to the public, is the "Popular Posts" gadget.

Popular Posts identifies from 1 to 10 of the most popular posts in the blog, by comparing Stats pageview counts. Optional parts of the display of each post are a snippet of text, and an ever popular thumbnail photo.

Like many Stats features, blog owners have found imaginative uses for "Popular Posts" - and overlook the limitations of the gadget. Both the dynamic nature of Stats, and the timing of the various pageview count recalculations, create confusion, when Popular Posts is examined.

Free Domain Registration By "UNONIC" Is Fraudulent

Blogger blog owners, like everybody else, like to save money.

Some blog owners prefer to save money when registering a custom domain, for their blogs. We've seen several free domain registration services, providing what is claimed to be a two level Top Level Domain "co.xx" (where "xx" == various country codes).

The latest in this ongoing story appears to be "net.tf" - and 13 other "top level domains".There is also an additional free service offering third-level .tf domains, under the name United Names Organisation. They occupy 14 second-level domains, including .eu.tf, .us.tf, .net.tf, and .edu.tf. They are run by the same company as smartdots.com, and are given away as URL redirections.