如何在Blogger beta "繼續閱讀"

感謝Chagg,
我現在終於可以在Blogger將不要在首頁顯示的文章隱藏起來了。

先去Template → Edit HTML → 在Expand Widget Templates前面打勾,

<b:include data='blog'name='all-head-content'/>
<title><data:blog.pageTitle/></title>


<b:skin><![CDATA[/*
之間,插入
<script type="text/Javascript">
function hidePost(postUrl)
{
var label=document.getElementById("fullpost");
if(label!=null){
eA = document.createElement("a");
eA.setAttribute("href",postUrl);
eA.setAttribute("title","Read More");
eA.appendChild(document.createTextNode("...Read More"));
eB = document.createElement("p");
eB.setAttribute("id","read-more");
eB.appendChild(eA);
label.parentNode.appendChild(eB);
label.parentNode.removeChild(label);}
}
</script>

再往下找,將
<p><data:post.body/></p>
換成
<p><data:post.body/></p>
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:post.url'>
<script type='text/javascript'>hidePost('<data:post.url/>');</script>
</b:if>
</b:if>

這樣就修改完HTML的部份了!
以後,若文章太長,
便可以在打好文章內容後,將編輯視窗切換到Edit Html,
將不想在首頁出現的部份,
放在<div id=”fullpost”>和</div>之間。


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: