This guide is done mostly for facebook comments, building on top of my previous guide on how to add them to your blog ( here it is for those of you who don’t have them yet), but it will also work for Disqus or any other thing you want to add to each post.
About Tumblr’s layout
While adding the comments box, or when exploring the html, you may have noticed stuff like:
{block:IfShowTags}
This is one basic of the layout in tumblr… everything between { } (curly brackets) is something that tumblr understands and computes… it’s not part of HTML, nor does your browser gets to see, it tells tumblr what or how (or how not) to send something to others. For example:
{block:Posts}
This tells tumblr where your post starts, everything after it will be repeated on each of your posts… so, if you type “Lalala, watch my post” after it, you’ll start seeing that somewhere before your posts… but what’s important, somewhere before EACH. That’s sort what we want… but we want it at the end:
{/block:Posts}
This is what tells tumblr where your post ends, so this is what we’ll be looking for on this tutorial. Go to customize, Edit HTML, click inside the text box which contains the html, and press ctrl+f and type “{/block:Posts}” so it takes you there.
Now, somewhere before {/block:Posts} you have to copy paste the code of your comment box (or whatever you want to add to each post). Now, your box will appear on each post. Though… maybe not where you want it. Where exactly depends a lot in your layout, so, either you understand HTML and read through it….. or, you start guessing.
Guessing where to paste it
First, just paste it exactly above where {/block:Posts} is. And then “Update preview”. If your theme makes some border around your posts (like my blog at the time of writing does) then it’s probably outside of it…. which you probably don’t want, so now you have to start going up:
</div>
This tag means that a section/DIVision is ending (In HTML, a tag is anything that has <sometext> -notice the ‘<’ ‘>’ - . A tag that starts with / means that it’s the end tag, just like with /block:Posts above). You will have to start moving your code up, and pasting it just before each </div> until it’s inside where you want it. (Note: Some themes might use <span> or other tags to mark their blocks, just look in general for ending tags, </span> in that example). This is how it is in my/this blog:
{block:ifFacebookCommentsOn}<div class="fb-comments" data-href="{Permalink}" data-num-posts="2" data-width="500" data-colorscheme="dark"></div>{/block:ifFacebookCommentsOn}
</div>
<div class="bottom"></div>
{/block:Posts}
And that should be it! Feel free to ask any questions! Which I’d prefer through the comment box : )