1

How to add this to a Blogger template header:

rel='canonical'

I made a mistake with data:post.url, which doesn't work on the header and gives me error message"

<link expr:href='data:post.url' rel='canonical'/>

  • 1
    It's okay to answer your own question, but you need to post a clear, understandable question in the question post and create a separate answer post with your answer. Unless you're trying to answer a different question on here, in which case you should answer that question, not create a new question post. Please read our help center. – ale Feb 25 '14 at 3:18
1

I tried it my self and find the correct code

<b:if cond="data:blog.isMobile">
 <b:else/>
<b:if cond='data:blog.url'>
<link expr:href='data:blog.url' rel='canonical'/>
</b:if>
</b:if>

the code "data:blog.url" retrieve correct Page url in blog I hope this help others . .

0

This is solely automatically supported by Blogger as it’s powered by Google.

<b:include data="blog" name="all-head-content"/>
-1

You can try

<b:include data='blog' name='all-head-content'/>

I also use it on my blog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.