2009年5月8日 星期五

將 Google AdSense 放置文章標題下方

進入「資訊主頁」>「版面配置」>「修改HTML」>「修改範本」>把「展開小裝置範本」打勾,找到以下程式碼,然後插入從Google AdSense所取得的廣告程式碼。


<b:if cond='data:post.url'>
<a expr:href='data:post.url'><data:post.title/>

[Google AdSense程式放置處]<---

</a>
<b:else/>
</b:if>
</h3>
</b:if>
<div class='post-header-line-1'/>


最重要的地方是要修正一下AdSense程式碼,只是把xml格式換了一種寫法(因為blogger使用xml格式,如果語法要使用字符 < ﹐而該字符卻絕對不能以 < 出現在任何的XML 資料中﹐這樣必須遵循XML 1.0 的規則﹐也就是應鍵入成 &lt;)
把 < 和 > 改為 &lt; 跟 &gt;,範例如下



<script type="text/javascript">&lt;!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 468x60, 已建立 2008/8/15 */
google_ad_slot = "0445797044";
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>




引用文章:將Google AdSense放置於文章標題下方

沒有留言:

張貼留言

Random Post