How to Display Elements (Ads) Only On (Or Only Not At) Individual Single Post Item View如何顯示元素(廣告) ,只(或只有不)個別單一郵政項目的看法

Blogger.com, a popular free blog publishing service from Google, has a extremely easy to use and convenient template system that allows users to design the blog user interface presentations by selecting a theme and then drag and drop various page elements such as poll, newsreel, video bar, feed, label, logo, AdSense, HTML/JavaScript and more to align them according to users’ preference on blog layout. blogger.com後,受歡迎的免費博客出版服務由Google提供,有一個非常易於使用和方便的模板系統,允許用戶設計的博客用戶界面介紹選擇一個主題,然後拖放各種網頁元素,例如民意調查,新聞短片,視頻酒吧,飼料,標籤,標識, AdSense的的HTML / JavaScript和更使他們根據用戶的喜好對博客佈局。 However, it also comes with serious limitations, such as when you want to make certain elements (ie Google AdSense ad unit) to appear and show when visitors visit single post item individually, or just want to shown the widget component block on homepage, archive and label or category pages.然而,它也具有嚴重的局限性,例如當您想要讓某些要素(即Google AdSense廣告的單位)出現並顯示,當訪客造訪的單一項目後單獨,或者只是想表明,該Widget組成阻滯對網頁,存檔和標籤或類別的頁面。

Blogger.com allows users to manually the XML-based template HTML, thus allows a hack which enables users to manually edit the HTML code to achieve the aim to display and show certain widgets or part of webpages on individual post page view only. blogger.com允許用戶以手動方式基於XML的模板,從而允許黑客使用戶以手動編輯HTML代碼,以便達到目的,以顯示和顯示某些widgets或部分網頁就個別帖子頁只查看。 However, you have need to have a basic HTML knowledge to modify the HTML code of Blogger’s template, which as editable by clicking on Template tab (or Layout of the blog you want to change if at Dashboard), and then click on Edit HTML .不過,您有需要有一個基本的HTML知識,要修改的HTML代碼Blogger的範本,作為編輯按一下模板標籤(或佈局的博客您想要變更的,如果在儀表板) ,然後按一下編輯HTML格式

The trick is show a widget in single post item view only is to add the following two lines of code to the top and bottom of the code block respectively:訣竅在於顯示窗口小部件在單一項目後的看法,不僅是要添加以下兩行代碼,頂部和底部的代碼塊分別是:

<b:if cond='data:blog.pageType == "item"'> <b:if cond='data:blog.pagetype == "item"'>
</b:if> < /乙:如果>

The above lines will add in a condition which value is negative is the blog is not showing individual post content page.上述線路將增加在一個條件,其中的價值是否定的是博客是不會顯示個別文章內容網頁。 Thus anything that are wrapped inside it won’t be shown on homepage, label or category pages, or archive pages.因此,任何包裹內將不會出現在網頁上,標籤或分類網頁,或存檔的頁面。 For example, while例如,雖然 wrapping the AdSense ads manually beside the post content包裝AdSense廣告手動旁張貼內容 , you can make the ads displayed only when individual posts are viewed by adding above 2 lines to the code, so that it will has the following structure: ,您就可以讓顯示的廣告,只有當個別職位來看,加入上述二行代碼,因此,它將具有以下的結構:

<b:if cond='data:blog.pageType == "item"'> <b:if cond='data:blog.pagetype == "item"'>
Parsed Google AdSense Ad Code (guide to剖析Google AdSense廣告代碼(指南 parse the HTML code of AdSense JavaScript with escape character解析HTML代碼的AdSense的JavaScript與轉義字符 )
</b:if> < /乙:如果>

To display the page elements or ad units on every pages except individual post content view pages, wrap the following lines of code instead:以顯示該網頁的內容或廣告的單位對每一個網頁,除個別職位內容查看的頁面,總結下列幾行代碼:

<b:if cond='data:blog.pageType != "item"'> <b:if cond='data:blog.pagetype != "item"'>
</b:if> < /乙:如果>

The above statements make use of conditional statements similar to IF, ELSE, END IF in most programming languages.上述報表使用條件語句類似,如果,否則,如果年底,在大多數的編程語言。 The Blogger XML support these three conditional statements too. Blogger的XML支持這三個條件語句。 Two already been used above, with the third one ELSE is <b:else>.二已經被用來以上,與第三人是<b:else> 。 You can make use of <b:else> to instruct Blogger template to display this widget (eg AdBrite ads) on all pages except single post pages, and show another widget (eg AdSense ads) on individual post pages.您可以使用<b:else>指示Blogger模板,以顯示這個窗口小部件(例如adbrite廣告)的所有網頁上,除單一的帖子頁,顯示另一窗口小部件(例如, AdSense廣告)就個別後的頁面。

Other than ads code or JavaScripts that are manually inserted into Blogger HTML, the above trick can be applied to widget based page elements that are added to the layout.以外的其他廣告代碼或javascripts是手動插入到Blogger的HTML ,上述的伎倆,可用於小裝置為基礎的網頁內容,都被添加到佈局。 But you need to study carefully the HTML code to identify which blocks of code is the element in order to add in above codes to wrap on top and bottom around them.但您需要仔細研究的HTML代碼,以確定哪些塊代碼是元素,以添加在上述守則,以總結對頂部和底部靠近他們。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明 :這是一個機器翻譯網頁是“按原樣”提供的擔保。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原版的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at分享和貢獻,或取得技術的支持和幫助,在 My Digital Life Forums 我的數字生活論壇 .



8 Responses to “How to Display Elements (Ads) Only On (Or Only Not At) Individual Single Post Item View” 8回應“如何顯示元素(廣告) ,只(或只有不)個別單一郵政項目的意見”

  1. How to Wrap AdSense Ads Around and Inline Beside Blogger Post Content » My Digital Life如何總結AdSense廣告約和內置旁邊的Blogger帖子內容»我的數位生活
    October 3rd, 2007 01:17 2007年10月3日1時17分
    1

    [...] Note that you can also make the ads appear only on single post view. [ … … ]注意,您也可以使廣告只會出現在單一的工作地點的看法。 [...] [ … … ]

  2. Indiaholic indiaholic
    November 5th, 2007 02:20 2007年11月5日2時20分
    2

    Thanks.謝謝。 That helped.幫助。

  3. Sham @ Enhance Life深水@提高生活
    January 2nd, 2008 16:45 2008年1月2日16時45分
    3

    Do u have any idea how the same thing can be done using the classic template in blogger?做u有任何想法如何同一件事可以做使用經典模板在Blogger嗎?

    The if condition to check for?如果該條件,以檢查?

  4. Rapidshare Bloggers rapidshare博客
    January 13th, 2008 01:32 2008年1月13日1時32分
    4

    I used我用
    (if(in_category(CATID)) (如果( in_category ( catid ) )
    {
    }

    Works great偉大的工程 : )

  5. Vlada vlada
    April 11th, 2008 01:29 2008年4月11日1時29分
    5

    I’ve tried but code is automatically set to:我試過,但代碼會自動設定為:


    test display 測試顯示

    My aim is to display “test display” only on homepage.我的目標是要顯示“測試顯示, ”只有對網頁。

  6. sheetal
    May 6th, 2008 22:19 2008年5月6日22時19分
    6

    Hi,嗨,
    I like to play with html, and location of adsense on my blogs.我喜歡玩的HTML ,和位置的AdSense對我的Blog 。 I chanced upon your post and implemented the code to appear on a single post. i偶然後,您的文章並實施了代碼出現在一個單一的工作地點。 Then I got a new template and I had to start all over again.So now I have bookmarked your post, for future reference.然後我得到一個新的模板和我開始,所有超過again.so現在我已書籤您的文章,以供日後參考。 Great post.偉大的職位。

  7. gre的GRE
    May 30th, 2008 02:30 2008年5月30日2時30分
    7

    this is what i looking for.這是我在尋找。 thanks for help.感謝您的幫助。

  8. Jmay88 jmay88
    August 16th, 2008 23:54 2008年8月16日23時54分
    8

    Thanks a lot..this trick is very useful to me..感謝了很多..這一招是非常有益的,我..

Leave a Reply離開的答复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用這些標籤:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <刪除日期時間= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>

Subscribe without commenting訂閱無評論


Custom Search

New Articles新的條款,

Incoming Search Terms for the Article傳入的搜索條件文章

how to Display adsense is Only On Individual Single Post Item View 如何顯示AdSense是只對個別單一郵政項目的看法 - - display element at item page 顯示元素在項目頁 - - conditional google ads 有條件的Google廣告 - - display widgets only on label pages in blogger 顯示工具不僅對標籤的頁面在Blogger - - how to hide ads from main page but show at single page at blogger 如何隱藏的廣告主網頁,但顯示在單一網頁在Blogger - - make elements appear only in main page blogger 使元素只出現在主網頁的Blogger - - html code to display a page only in mobile HTML代碼來顯示網頁,只有在移動 - - javascript conditional wihtout modifying adsense 有條件的JavaScript wihtout修改的AdSense - - show blogger widgets home page not inside page 顯示Blogger的widgets的首頁沒有內頁 - - block adbrite ads from a certain part of the page 座adbrite廣告的某部分網頁 - - how to display widgets only on blogger homepage 如何顯示工具不僅對Blogger首頁 - - How to display widgets only certain pages wordpress? 如何顯示工具,只有某些網頁的WordPress ? - - how to add an ad only on homepage if the template is paged 如何添加一個廣告只在網頁上,如果該模板是分頁 - - Show ads only in wordpress single post 顯示廣告,只有在WordPress單後 - - 4 elements advertisment 四元素廣告 - - display elements home blogger 顯示elements主頁的Blogger - - conditional javascript to display code based on page visited 有條件的JavaScript以顯示代碼的基礎上的網頁訪問 - - show adsense only "post page" wordpress 顯示AdSense唯一的“帖子頁”的WordPress - - conditional widget display wordpress 有條件的小裝置顯示的WordPress - - what is element of advertisment 什麼是元廣告 - - widget only on homepage blogger 小裝置不僅對網頁的Blogger - - display html elements conditional 顯示HTML元素,有條件的 - - blogger conditional javascript Blogger的有條件的JavaScript - - blogger conditional visitor 有條件的Blogger訪客 - - display blogger element blank 顯示Blogger的元素空白 - - show ads only on single posts view+wordpress 顯示廣告,只對單一的職位,以期+在WordPress - - display ad only on post pages 顯示廣告只在帖子頁 - - page element ads 網頁元素的廣告 - - download page elements for blogger ads 下載網頁的內容的Blogger廣告 - - element homepage blogger 網頁元素的Blogger - - only display add comments 只顯示添加評論 - - display blogger element by label 顯示Blogger的元素,由標籤 - - advertisment widget 廣告的小裝置 - - blogger layout conditional if single Blogger的佈局,有條件的,如果單 - - display in homepage only blog wordpress 顯示在網頁上只有博客的WordPress - - show ads in the post page only 顯示廣告在帖子頁只 - - conditional statements in advertisments 有條件的報表在廣告中 - - conditional widget+blogger 有條件的窗口組件+的Blogger - - html conditional display widgets 有條件的HTML顯示工具 - - how to hide widget from page in blogger 如何隱藏窗口小部件從網頁在Blogger - - how to hide ads widget from some pages in blogger 如何隱藏的廣告窗口小部件從某些網頁在Blogger - - how to display an advertisement on html 如何顯示的廣告的HTML - - element ads 元廣告 - - "windows mobile" "display test" “通過Windows Mobile ” , “展示測試” - - ads only blogger post page 廣告只Blogger帖子頁 - - javascript if condition for blogger JavaScript的,如果條件的Blogger - - elements of google 要素的Google - - javascript display html only on certain pages JavaScript的顯示HTML格式的,只有在某些網頁上 - - Create HTML Advert Blocks in Blogger 創建的HTML廣告座在Blogger - - how to hide a post from homepage in blogger 如何隱藏後,從網頁在Blogger - -