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 我的数字生活论坛 .



9 Responses to “How to Display Elements (Ads) Only On (Or Only Not At) Individual Single Post Item View” 9回应“如何显示元素(广告) ,只(或只有不)个别单一邮政项目的意见”

  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..感谢了很多..这一招是非常有益的,我..

  9. Sherin谢林
    September 7th, 2008 21:20 2008年9月7日21时20分
    9

    This is an extremely well article and whatever saying here in intact while going to real time basis.这是一个非常出色的文章,无论在此间说,在完整的同时,要实时性的基础上。 My appreciations to giving such terrific information and the well written style.我赞赏让这种可怕的信息和写得不好的作风。 Nice work.尼斯的工作。

    I have placed ad sense by following the instructions given here and it is working fantastic without a second involvement.我已放置的广告意识,按照下列指示在这里,而且是工作幻想没有第二的参与。

    Many thanks from my end.许多感谢从我的结束。

    Sherin from Investinternals谢林从investinternals

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 显示元素在项目页 - - element ads 元广告 - - 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 - - "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 - -