This article will describe how to add different meta tags for each blogger post based on post title.
In Blogger Dashboard, go to Design, then Edit HTML. Find code below:
<b:include data='blog' name='all-head-content'/>Add code below after that code,
<b:if cond='data:blog.url != data:blog.homepageUrl'>The code will have result that if the page is not homepage or main page, it will have meta tag description using post title.
<meta expr:content='data:blog.pageTitle' name='description'/>
</b:if>
If we combine from my previous article about adding meta tags to blogger homepage, and this article, we can add meta tags to homepage/main page hardcoded to template, and different meta tags to each post using post title.
The code will be like this,
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<meta content='DESCRIPTION HERE' name='description'/>
<meta content='KEYWORDS HERE' name='keywords'/>
</b:if>
<b:if cond='data:blog.url != data:blog.homepageUrl'><meta expr:content='data:blog.pageTitle' name='description'/>Code above will make static meta tags for main page/homepage, and title tags for each post.
</b:if>
إرسال تعليق