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.しかし、深刻な限界でも、そのようなときに表示されるように訪問者が個別に、または1つのポスト品物のホームページを訪れるだけで、アーカイブ上のウィジェットを表示するコンポーネントのブロックを示す特定の要素(例えば、 Google AdSenseの広告ユニット)を作りたいとなるやラベルやカテゴリページ。
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テンプレートは、そのためには、ユーザーが手動で目的のみを表示し、特定のウィジェットや個々の投稿ページビューを達成する上でのウェブページの一部を表示するためのHTMLコードを編集することができますハックできることができます。 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 .しかし、お持ちには、 [テンプレート]タブには、ブログをダッシュボードで、変更したい場合(またはレイアウト)をクリックして、編集、 Bloggerのテンプレートの HTML コードを変更するための基本的なHTMLの知識があるし、編集をクリックする必要がある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:このトリックは、コードブロックの上部と下部にそれぞれのコードの次の2行を追加するには1つの投稿アイテムビューでウィジェットが表示されます:
<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:場合は、広告のみが個々の投稿のコードに2行の上に、その結果は以下の構造になっています追加:によって表示される表示することができます
<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エスケープ文字とAdSenseのJavaScriptのHTMLコードを解析 ) )
</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>
The above statements make use of conditional statements similar to IF, ELSE, END IF in most programming languages.上記の文と同様の条件付きのIFステートメントを使用すると、他の人に、 IFほとんどのプログラミング言語に終わる。 The Blogger XML support these three conditional statements too.は、 BloggerのXMLも、これらの3つの条件文をサポートしています。 Two already been used above, with the third one ELSE is <b:else>.上記の2つはすでに、第3 <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.広告コードや、手動でBloggerのHTMLを、ウィジェットに適用することができます上記のトリックには、レイアウトに追加されるページ要素をベースに挿入されている以外JavaScripts 。 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 私のデジタルライフフォーラム . 。
Related Articles関連記事
- Move Blogger Inline Ads Between Posts to Inside Within Post Positionブロガーの間で移動するインライン広告の中に投稿する立場に投稿
- How to Wrap AdSense Ads Around and Inline Beside Blogger Post Content横にあるインラインBlogger投稿コンテンツとはどのように巻き付けるAdSenseの広告に
- Retrieve and Get WordPress Post ID Outside the Loop as PHP Variableワードプレスの郵便番号を取得を取得し、ループのPHP変数として外
- Adding Extra More Fields to WordPress Write/Edit Post/Page Right Columnワードプレスを書いて余分なほかのフィールドを追加/編集ポスト/ページの右の列
- Place AdSense Ad Unit In Various Positions Inside Within Blogger Post Contents場所AdSenseの広告ユニット内のブロガーの投稿内容の中にさまざまな位置に
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working Paginatingまたはスプリットワードプレスの投稿やページにNextPageが、ワードプレスが機能しない
- Disable Auto Go To (Jump) To Read More Tag自動車をもっと読むタグを無効にするには(ジャンプ)に行く
- Stop Comment, Pingback and Trackback Spam with New Version of Akismetコメントを停止する、ピングバックとトラックバックスパムの新バージョンアキスメット
- Trick to Add AdSense, AdBrite and Other JavaScript Ad Code Directly to Blogger HTML TemplateトリックBloggerのHTMLテンプレートへのAdSense 、 AdBriteは、その他のJavaScriptの広告コードを直接追加する
- Adobe Introduces Elements 7 Bundle and Photoshop.com Adobeの紹介要素7束とPhotoshop.com

































October 3rd, 2007 01:17 2007年10月3日01:17
[...] Note that you can also make the ads appear only on single post view. [...]は、また、広告を1つの記事を表示のみに表示させることができます注意してください。 [...]
November 5th, 2007 02:20 11月、第5回2007/07/14 02:20
Thanks.ありがとう。 That helped.を手伝った。
January 2nd, 2008 16:45 2008年1月2日16:45
Do u have any idea how the same thing can be done using the classic template in blogger? u詳細な任意のアイデアは、同じことをブロガーには、クラシックテンプレートを使用して行うことができますか?
The if condition to check for?この場合の状態をチェックするか?
January 13th, 2008 01:32 2008年1月13日01:32
I used私は使用
(if(in_category(CATID)) (もしあれば( in_category ( CATID ) )
{ (
} )
Works great素晴らしい作品
April 11th, 2008 01:29 4月11日、 2008年01:29
I’ve tried but code is automatically set to:私が試したのコードを自動的に設定されています:
test display テスト表示
My aim is to display “test display” only on homepage.私の目標" "ホームページ上でのみテストディスプレイ表示することです。
May 6th, 2008 22:19 2008年5月6日22:19
Hi,やあ、
I like to play with html, and location of adsense on my blogs.私のHTMLと一緒に演奏するようにとAdSenseの場所私のブログに。 I chanced upon your post and implemented the code to appear on a single post.私はあなたの投稿時にたまたまと1つの記事に表示されるように、コードを導入しました。 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.非常に投稿してください。
May 30th, 2008 02:30 5月30日、 2008年02:30
this is what i looking for.これは私が探しているもの。 thanks for help.助けてくれてありがとう。
August 16th, 2008 23:54 8月16日、 2008年23:54
Thanks a lot..this trick is very useful to me..おかげで、このトリック..たくさんのは私にとって非常に便利です..
September 7th, 2008 21:20 2008年9月7日21:20
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.私はここに与えられた指示に従って、広告の感覚を配置しているし、素晴らしい2つ目の関与なしに取り組んでいる。
Many thanks from my end.私の終わりから、感謝します。
Sherin from InvestinternalsシェリンInvestinternalsから