Monday, November 4, 2013

Before
After
Finally, a non-dynamic post after a long time (or I should say, a *post* after a long time).. Knowing there's a way to add labels next to post titles, blog reader Amy was curious to know if there's a way to do the same with Comment links - adding the link next to the title, including the comment counter.. Since this doesn't involve a Dynamic template, you have all the reason in the world to believe there must be a way. Personally, I think this tweak could be especially handy, now that the comment link in post footer is more of a hit-and-miss thing. Without further ado, here's how..

Step 1:

Backup your template by going to Dashboard - Template - Backup/Restore - Download Full Template. Next, go to Dashboard - Template - Edit HTML - Find and delete the following lines:

<b:includable id='post' var='post'>
<div class='post hentry' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
<b:if cond='data:post.firstImageUrl'>
<meta expr:content='data:post.firstImageUrl' itemprop='image_url'/>
</b:if>
<meta expr:content='data:blog.blogId' itemprop='blogId'/>
<meta expr:content='data:post.id' itemprop='postId'/>

<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<h3 class='post-title entry-title' itemprop='name'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<b:if cond='data:blog.url != data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h3>
</b:if>

Screenshot of the lines to be deleted:



Step 2:

Copy and paste the following lines in place of the deleted lines in Step 1, then click on 'Save Template'.
<b:includable id='post' var='post'>
<div class='post hentry' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
<b:if cond='data:post.firstImageUrl'>
<meta expr:content='data:post.firstImageUrl' itemprop='image_url'/>
</b:if>
<meta expr:content='data:blog.blogId' itemprop='blogId'/>
<meta expr:content='data:post.id' itemprop='postId'/>

<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<h3 class='post-title entry-title' itemprop='name'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a><span> | </span>
<span class='post-comment-link spk-title-comment'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:include data='post' name='comment_count_picker'/>
</b:if>
</span>
<b:else/>
<b:if cond='data:post.url'>
<b:if cond='data:blog.url != data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a><span> | </span>
<span class='post-comment-link spk-title-comment'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:include data='post' name='comment_count_picker'/>
</b:if>
</span>
<b:else/>
<data:post.title/><span> | </span>
<span class='post-comment-link spk-title-comment'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:include data='post' name='comment_count_picker'/>
</b:if>
</span>
</b:if>
<b:else/>
<data:post.title/><span> | </span>
<span class='post-comment-link spk-title-comment'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:include data='post' name='comment_count_picker'/>
</b:if>
</span>
</b:if>
</b:if>
</h3>
</b:if>

That will be all. Happy trying :)

Elm0D

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment

Navigate» Become author for this Blog

Manual Categories