Posted on Leave a comment

Trying to figure out why anchors are not working

Added Title and URL options in Settings->formating of blogger. What do these do?

Ah! Got it! For some reason the blogger template has this code:

<BlogItemTitle><h2><$BlogItemTitle$><a name=”<$BlogItemNumber$>”>&nbsp;</a></h2></BlogItemTitle>

which makes sense but in your Settings->Formatting if Titles is set to “No” in theory this means that your anchors won’t show up which means your “perma links” won’t work.

What’s a “perma link”? Each post has a “posted by” byline and in that there is a link which shows something like “” which would be the link to this post. As an example, here’s a link to my post about Eatting Spongebob Squarepants

I tried turning on Titles but it didn’t seem to change anything. Perhaps I had a browser cache problem or I had not republished the template or something. However, the following change DEFINITELY works:

<a name=”<$BlogItemNumber$>”>&nbsp;</a><BlogItemTitle><h2><$BlogItemTitle$></h2></BlogItemTitle>

With that in place using the “#postnumber” in the url will take you to a specific post. You can confirm this by “view source” and searching for “<a name” You should have several that appear as <a name=”postnumber”> without the “#” mark.

Hope this helps someone.

More info: Perma link origins

Blogger Knowledge Base And there it is “(This should go somewhere in your post body. If you include it in the itemtitles section, your post will only get numbered if you specify a title.)” straight from the knowledge base.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.