How can I change the "Post a Comment" text?
Note: This article is for classic templates. If you are using Layouts, you can simply find the
<data:postCommentMsg/> tag and replace it with whatever text you like.
By default, Blogger comments include the
<$BlogItemCreate$> template tag, which prints out a link that says "Post a Comment." This is pretty easy, but doesn't let you customize the text, which you might want to do if your blog is in a language other than English, for instance. So here's a way to get around this.
Let's start by taking a look at the code created by the
<$BlogItemCreate$> tag. This is the code that gets printed to your blog when you publish:
<a href="http://www.blogger.com/comment.g?blogID=XXX&postID=YYY"> Post a Comment</a>
The 'XXX' and 'YYY' here represent the ID numbers which get inserted automatically for the appropriate blog and post. So what we're going to do here is replace the
<$BlogItemCreate$> tag with this code, and then modify it as follows:
- Find your blog ID and put this into the code in place of "XXX." This is the same for all comments on a single blog, so you can just enter the number directly, without needing to use a special template tag.
- Put the
<$BlogItemNumber$>tag in place of "YYY." This will automatically use the correct post ID number for each post.
- Change "Post a Comment" to say anything you like, such as "Dejame un comentario."
The result will look something like this:
<a href="http://www.blogger.com/comment.g? blogID=1234567&postID=<$BlogItemNumber$>">Dejame un comentario</a>
Before and after shots:
- You'll need to use a different blog ID for each of your blogs, to make sure comments get posted to the right place.
- The code in this example wraps onto a few lines in order to fit into this column, but make sure that it stays all on one line in your template (with no spaces in the address).
- Remember to remove the original
<$BlogItemCreate$>tag, so you don't have an extra copy of the link showing up and confusing your readers.
- The "Comments" header is just regular text in your template, so you don't need to do anything fancy to change that. Just type whatever you want in its place. You can see that I changed it to "Comentarios" in the example above.