从 Tumblr 主页面删除 Disqus 评论框,但保留每个 post 页面的评论框?
Remove Disqus comment box from main Tumblr page, but keep comment boxes for each post's page?
我没有在 Whosebug 或 Google 上找到问题的解决方案,所以我想问一下。
我将 Disqus 添加到我的自定义主题 Tumblr 博客,但我想更改 Disqus 评论 box/system 出现的位置。特别是,我不希望它出现在 Tumblr 主页上,但我希望它出现在每个 post 的页面上。所以,如果你去我的 Tumblr 的 main page you will see the Disqus system at the bottom - I want to remove it from there. But, I would like the Disqus system to appear on each post's page: see how it appears on the bottom of "Second test post" 的独特页面。
任何关于如何实现这一点的想法都将不胜感激。我尝试过的一切都只是从每一页中删除了 Disqus。谢谢!
我的 Tumblr HTML 正文如下:
<body>
<div id="wrapper">
<div id="headerleft">
<h1><a href="{BlogURL}" title="read my thoughts">Blog</a></h1>
<ul id="menu">
<li><a href="http://michelemasiello.com" title="home">home</a></li>
<li>  |  </li>
<li><a href="http://michelemasiello.com/projects.html" title="check out my work">projects</a></li>
<li>  |  </li>
<li><a href="mailto:msm@michelemasiello.com" title="email me">say hello</a></li>
</ul>
</div>
<div id="headerright">
<p>"Everything has been thought of before, but the problem is to think of it again."<br>— Johann Wolfgang von Goethe</p>
</div>
<div id="recentposts">
<ul id="postlist"></ul>
</div>
{block:Posts}
{block:Text}
<div class="post">
{block:Title}
<h2><a href="{Permalink}">{Title}</a></h2>
{/block:Title}
{Body}
<br>
<ul class="like-reblog">
<li>{LikeButton color="black"}</li>
<li>{ReblogButton color="black"}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{/block:Text}
{block:Photo}
<div class="post">
<img src="{PhotoURL-500}">
{block:Caption}{Caption}{/block:Caption}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Photo}
{block:Quote}
<div class="post">
{Quote}
{block:Source}<br>—{Source}{/block:Source}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Quote}
{block:Link}
<div class="post">
<a href="{URL}" {Target}>{Name}</a>
{block:Description}{Description}{/block:Description}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Link}
{block:Chat}
<div class="post">
{block:Title}{Title}{/block:Title}
<table>
{block:Lines}
<tr>
<th>{block:Label}{Label}{/block:Label}</th>
<td>{Line}</td>
</tr>
{/block:Lines}
</table>
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Chat}
{block:Audio}
<div class="post">
{AudioPlayer}
{block:Caption}{Caption}{/block:Caption}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Audio}
{block:Video}
<div class="post">
{Video-500}
{block:Caption}{Caption}{/block:Caption}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Video}
{/block:Posts}
{block:IfDisqusShortname}
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{text:Disqus Shortname}'; // Required - Enter shortname in Tumblr Theme Options
var disqus_url = '{Permalink}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
{/block:IfDisqusShortname}
{block:Pagination}
<div class="pagenav">
{block:PreviousPage}<a href="{PreviousPage}">Previous</a>{/block:PreviousPage}
{block:NextPage}<a href="{NextPage}">Next</a>{/block:NextPage}
</div>
{/block:Pagination}
</div>
</body>
在 {block:IfDisqusShortname}
之前添加 {block:PermalinkPage}
,在 {/block:IfDisqusShortname}
之后添加 {/block:PermalinkPage}
,如下所示:
{block:PermalinkPage}
{block:IfDisqusShortname}
//Disqus' code
{/block:IfDisqusShortname}
{/block:PermalinkPage}
我没有在 Whosebug 或 Google 上找到问题的解决方案,所以我想问一下。
我将 Disqus 添加到我的自定义主题 Tumblr 博客,但我想更改 Disqus 评论 box/system 出现的位置。特别是,我不希望它出现在 Tumblr 主页上,但我希望它出现在每个 post 的页面上。所以,如果你去我的 Tumblr 的 main page you will see the Disqus system at the bottom - I want to remove it from there. But, I would like the Disqus system to appear on each post's page: see how it appears on the bottom of "Second test post" 的独特页面。
任何关于如何实现这一点的想法都将不胜感激。我尝试过的一切都只是从每一页中删除了 Disqus。谢谢!
我的 Tumblr HTML 正文如下:
<body>
<div id="wrapper">
<div id="headerleft">
<h1><a href="{BlogURL}" title="read my thoughts">Blog</a></h1>
<ul id="menu">
<li><a href="http://michelemasiello.com" title="home">home</a></li>
<li>  |  </li>
<li><a href="http://michelemasiello.com/projects.html" title="check out my work">projects</a></li>
<li>  |  </li>
<li><a href="mailto:msm@michelemasiello.com" title="email me">say hello</a></li>
</ul>
</div>
<div id="headerright">
<p>"Everything has been thought of before, but the problem is to think of it again."<br>— Johann Wolfgang von Goethe</p>
</div>
<div id="recentposts">
<ul id="postlist"></ul>
</div>
{block:Posts}
{block:Text}
<div class="post">
{block:Title}
<h2><a href="{Permalink}">{Title}</a></h2>
{/block:Title}
{Body}
<br>
<ul class="like-reblog">
<li>{LikeButton color="black"}</li>
<li>{ReblogButton color="black"}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{/block:Text}
{block:Photo}
<div class="post">
<img src="{PhotoURL-500}">
{block:Caption}{Caption}{/block:Caption}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Photo}
{block:Quote}
<div class="post">
{Quote}
{block:Source}<br>—{Source}{/block:Source}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Quote}
{block:Link}
<div class="post">
<a href="{URL}" {Target}>{Name}</a>
{block:Description}{Description}{/block:Description}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Link}
{block:Chat}
<div class="post">
{block:Title}{Title}{/block:Title}
<table>
{block:Lines}
<tr>
<th>{block:Label}{Label}{/block:Label}</th>
<td>{Line}</td>
</tr>
{/block:Lines}
</table>
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Chat}
{block:Audio}
<div class="post">
{AudioPlayer}
{block:Caption}{Caption}{/block:Caption}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Audio}
{block:Video}
<div class="post">
{Video-500}
{block:Caption}{Caption}{/block:Caption}
<ul class="like-reblog">
<li>{LikeButton}</li>
<li>{ReblogButton}</li>
<li>{block:NoteCount}<a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}</li>
<li>{block:Date}<a href="{Permalink}">{TimeAgo}</a>{/block:Date}</li>
<li>{block:IndexPage}<a class="dsq-comment-count" href="{Permalink}#disqus_thread">Comments</a>
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Shortname}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>{/block:IndexPage}</li>
</ul>
</div>
{block:PostNotes}{PostNotes}{/block:PostNotes}
{/block:Video}
{/block:Posts}
{block:IfDisqusShortname}
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{text:Disqus Shortname}'; // Required - Enter shortname in Tumblr Theme Options
var disqus_url = '{Permalink}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
{/block:IfDisqusShortname}
{block:Pagination}
<div class="pagenav">
{block:PreviousPage}<a href="{PreviousPage}">Previous</a>{/block:PreviousPage}
{block:NextPage}<a href="{NextPage}">Next</a>{/block:NextPage}
</div>
{/block:Pagination}
</div>
</body>
在 {block:IfDisqusShortname}
之前添加 {block:PermalinkPage}
,在 {/block:IfDisqusShortname}
之后添加 {/block:PermalinkPage}
,如下所示:
{block:PermalinkPage}
{block:IfDisqusShortname}
//Disqus' code
{/block:IfDisqusShortname}
{/block:PermalinkPage}