
Language 🇺🇸 English
Tumblr Installation
Add Live Commenting to Tumblr Blogs
This guide adds the FastComments live commenting widget to the post pages of a Tumblr blog by editing the blog's custom theme HTML.
Tumblr does not provide a comment form on a blog's public pages. Visitors can comment on a post only from the Tumblr dashboard or the Tumblr mobile apps. The FastComments widget adds a comment area to each post's permalink page on the blog itself.
The code is added once to the theme and applies to existing and future posts. Each post gets its own comment thread, identified by the Tumblr post ID. Theme editing is only available on the Tumblr website.
This guide requires a FastComments account. You can create an account here.
Step 1: Enable the Custom Theme 
The theme HTML can only be edited when the blog's custom theme is enabled.
- On the Tumblr website, click
Settingson the left. - Select the blog on the right.
- Under
Custom Theme, turn on theEnable custom themeswitch.
Step 2: Open the Theme HTML Editor 
In the same blog settings, under Custom Theme, click Edit Theme. This opens the theme Customizer.
Click the Edit HTML button to open the source code editor.
Step 3: Add the FastComments Code to the Post Template 
In the theme HTML, find the closing {/block:Posts} tag. Tumblr renders everything between {block:Posts} and {/block:Posts} once for each post. Paste the following code directly before {/block:Posts}:

When you are logged in to FastComments, the snippet contains your tenant ID in place of demo. If it still shows tenantId: 'demo', log in and reload this page, or replace demo with your tenant ID.
To check the result, click Update Preview. When you are finished, click the back arrow, then click Save.
The code works as follows:
{block:PermalinkPage}renders its contents only on post permalink pages, so the widget is not added to pages that list several posts.{PostID}is the numeric ID of the post and is used as theurlId. The comment thread stays attached to the post if its permalink changes.{JSPermalink}outputs the post's permalink as a JavaScript string, including the quotes. It is stored as the link to the post in notifications and moderation tools.
To position the widget elsewhere on the permalink page, move the code to another location inside the {block:Posts} block.
Step 4: Show the Custom Theme on Mobile 
Tumblr can show a default mobile theme to mobile visitors in place of the custom theme. The default mobile theme does not include the FastComments code.
To show the custom theme, and the comment widget, on mobile devices:
- In the Customizer, scroll to
Advanced Optionsat the bottom. - Turn off
Use default mobile theme. - Click
Save.
Tumblr Comments and Notes 
Tumblr comments are separate from FastComments comments. Tumblr users comment on a post from the dashboard or the mobile apps, and those comments appear in the post's notes together with likes and reblogs. Comments left in the FastComments widget do not appear in Tumblr notes, and Tumblr comments do not appear in the FastComments widget.
Tumblr does not provide a setting that turns comments off. The Comments setting, on the left side of the blog settings, limits who can comment. The most restrictive level allows comments only from blogs you follow.
A theme displays notes on permalink pages through the {PostNotes} variable, usually inside a {block:PostNotes} block. Removing that block from the theme HTML stops notes, including Tumblr comments, from being displayed on the blog. Notes remain visible on the Tumblr dashboard and in the apps.
Domain Errors 
The widget may show an authorization error like the following:
This error means the blog's domain has not been added to your FastComments account. Add the full domain the blog is served from, including the subdomain, for example example.tumblr.com. If the blog uses a custom domain, add that domain.
Customization 
Styling and widget options are described in the Customization Documentation.
Options set in code go in the object passed to window.FastCommentsUI in the theme code from Step 3. Options that do not require code can be set in the Widget Customization UI.