Translate This Blog
Remember To Always Back Up Your Template Before Attempting Any Of The Tweaks On This Site

Separate Meta Tags For Different Pages

With this tweak you can dictate the meta tags for specific post within your blog. However this can be quite labor intensive for those of you who are frequent bloggers. This will dictate the meta tags between pages in your blog but the value of meta tags has decrease over the years. Meta description is still used by all search engines but meta keywords are not used by most major search engines. Its still a good idea to place meta keywords within your blog because some smaller search engines may still use them.


First go to Design--> Edit HTML

Find this code below.  This should be near to top of your Edit HTML page 
<head>
Now directly below it place one of these codes below. These codes below specify what pages the meta tags will be used for. These are called  "Conditional" tags.
  • Homepage:
<b:if cond='data:blog.url == data:blog.homepageUrl'>
  • Post Pages:
<b:if cond='data:blog.pageType == "item"'>
  •  Static Pages:
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
  • Specific URL:
<b:if cond='data:blog.url == "Blog Post"'>
For specific page just replace the blue text with the URL of the page you want it to display on.

Now you will need to enter in your meta tag code below that. After your done with your meta tag code you need to close the code with a  b:if tag.

It should look something like this after your done. (This is just a simple meta tag code. You can use your own meta tag code if you want.)
<b:if cond='data:blog.url == "Blog Post or Label URL"'>
<meta content='YOUR META DESCRIPTION' name='description'/>
      <meta content='YOUR META 20KEYWORDS' name='keywords'/>
<meta content='YOURNAME' name='author'/>
</b:if>
Just make sure to fill in the color text with what its asking for. Also the keywords need to have a comma and space after them. Beware of what characters you use within your meta tags because Blogger may reject them.

You can check to see if its working by going to Meta Analyzer and inputting the post URL as the link to analyze.

19 comments:

Anish Sangamam said...

What if i want to add as many post url to this

AiresOFwar said...

You can stack the conditional tags or you enter the full code multiple times. If your stacking them then just repeat the Specific URL as many times as you want. But the rule is for every conditional tag you place, you must place a closing b:if tag.

HorseLoversMama said...

Is there not a way to do this using a VARIABLE,instead of manually putting text into the HTML.

We do not enter each post into the HTML, its entered into a database that the HTML pulls from.

sorry... I know its not YOU, its Blogger that did not create a "shortened post" variable. ..... Hmmm actually perhaps they DO have that... used in the RSS feeds maybe?

Ill have to look at it again. I have not yet figured out how they are calling the variables that relate to the blog vs the ones that relate to the exact post. (aha, just figured it out enough to write it). I guess its that the meta has to be in the header, but that area is only able to call Blog level variables, rather than post level variables.

Yet... it works in my ecommerce site.. the page calls some things which are 'store level" and some that are "product level"... with no problem getting the "product level" short-description variable as the meta desc.

Im not worried about SEO with these tags... Im wanting the meta description to show in search results and when posting on FB, etc --- so people will want to OPEN IT once they have found it.

Thanks for letting me ramble while thinking.

If you know of a way to combine it so I can pull post-level variables from the body, please let me know. Thanks!

AiresOFwar said...

I am still not 100% sure on what your talking about but this is the only way I know to use meta tags in separate post. I don't know of anyway to refer to a variable for XML coding such as your asking.

KrisProArgi9 said...

I read the other "help" tips and did all they said. I keep getting this error?
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Element type "meta" must be followed by either attribute specifications, ">" or "/>".
Error 500
What do I need to do??
Thank you,
Kristi R

AiresOFwar said...

This is a tedious tweak which this comment box will not allow us to go over. Could you please send me a email through the contact at the top of the blog. Provide the coding you tired to use.

Sybill said...

Does it work with the new template of Blogger? I can't seem to get it right

AiresOFwar said...

Yes this does work with new templates as I know of when last testing. This is a bit of a pain to input because everything needs to be perfect to be excepted. I use this tweak for some of my pages within my blog

Bob said...

I added the code to my Blogger HTML file. Specifically, I added meta tags for one static page. The meta tags for the main page had already been there and working fine. Blogger accepted the new code.

However, the Analyzer showed that new description and new keywords were not being picked up for the static page. Instead that page was still showing the input from the main page. Apparently, the new input was being overridden by the main page. What do I need to change? Thanks

Ariel said...

Hello AiresOFwar, I paste the code below "Head" witout space line or with some space?

And between each code for each post I put space line?

AiresOFwar said...

The space does not matter. Just make sure you paste it after the head and same for the individual codes.

Ariel said...

Thanks, another question...

The first 4 single code line you gave us at the beginning are just examples of what we need to add in the fist line of the complete code you put in the end? or that 4 single code lines goes alone first and below into complete code?

AiresOFwar said...

The 4 single lines are the conditions in which need to be added in the first line. You only need one per code unless you want use a single meta tag for multiple pages. In cases such as that you will add multiple conditions with a single meta tag code closed by the same number of b:if tag as you used condition codes.

Ariel said...

I plan add descriptions to each post, then I tell you...When I create my blog there was a fill to put description, I put one there, I think I is for gereral description, must I edit header to delete that general description so that does not affect this new sistem with separate codes?

AiresOFwar said...

That is a good question and I cant say for sure. Check the meta tag analyzer and see what it pulls up. If it shows your normal description then yes.

Ariel said...

Thanks AiresOFwar, your answers was useful for me.

I'll investigate about my last question...

And contratulation for creating this site, It looks well

Regards

Ariel said...

Hello!

I have a new question!

I was thinking, on some post of my blog would be good place: Post title > Post description (short and in the same line)

I'd like to know if this would be possible, but I'd like this only in a few post, not all post

AiresOFwar said...

I believe it is possible but the search engines would not like it one bit. I think it would do more harm then good if you were to place the post title and description in the title field.

Ariel said...

Thanks for your fast reply and giving your opinion!

Post a Comment

Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.

Web Design Blogs PageRank