Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I have successfully added Disqus to my Tumblr page quite some time ago, but for consistency I would like to remove the Disqus box from the ask page or all static pages. Is that even possible?

One of my Tumblelogs can be found here for reference.

share|improve this question
add comment

2 Answers 2

Found a way of doing it! Wrap it in PermalinkPagination blocks:

{block:PermalinkPagination}
   ...disqus code...
{/block:PermalinkPagination}

PermalinkPagination only shows on posts (actually, it only shows on posts if they have a previous and/or a next post, so it won't work on blogs with only one post) and not static pages. You can use it within the context of a PermalinkPage block to include content that should only show on post pages rather than static pages.

You can use PermalinkPagination numerous times in the template.

To see it in action, have a look at a static page vs. a blog post on my Tumblr blog.

share|improve this answer
    
Will give that a try. Thanks! –  oKtosiTe Apr 7 '11 at 10:07
    
Perhaps I'm doing something wrong, but that appears to break all the "x comments and y reactions" texts and links on the main "roll" page. –  oKtosiTe Apr 7 '11 at 12:57
1  
I'll pop the full template I'm using up shortly. –  Tom Morris Apr 7 '11 at 16:31
    
Thanks for that, Tom! But I still have a problem. Everything works fine in the blog posts and the disqus comments don't appear on the pages. But the "whatever-number comments" is still appearing on my pages and the ask page. I changed the HTML code on my page so the layout is the same but having a fixed content. But what can I do with the "ask" page? lodz-impressions.tumblr.com/ask I don't want "Comentarios" to appear anymore! :( Any idea? Thank you so much again! :) –  user10488 Apr 26 '11 at 22:22
    
Can you still provide the template? –  oKtosiTe Nov 17 '11 at 11:33
show 1 more comment

Wrapping the comment script in {block:Date} {/block:Date} seems to work, although it is a bit of a nasty hack. This works because {block:Date} is only rendered for posts with a date, which don't exist on the ask, submit, and static pages.

share|improve this answer
    
For some reason, that seems to hide the whole comments section, even on pages with a date... –  oKtosiTe Nov 17 '11 at 11:29
    
This worked for me. I added it after the {/block:PostNotes} line and before the {block:IfDisqusShortname}. (your template may vary) –  Clever Human Mar 1 '12 at 0:28
add comment

protected by Community Aug 3 '11 at 23:20

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.