The leading SEO (Search Engine Optimization) sites will tell you that placing an ad after the first post in your blog’s home page is particularly effective. This is because the ad is essentially embedded in the blog content, hence your readers are less likely to develop “ad blindness” and skip over the ad as usual.
To place an ad after the first post in your WordPress blog main page:
- Open the WordPress admin control panel and navigate to:
Presentation > Theme Editor
- Select the Main Index Template from the list of templates on the right.
- In the Main Index Template, find the line that starts with:
<?php if (have_posts())
- Add the following line above it:
<?php $count = 1; ?>
- Next, find the line that starts with:
<?php the_content
- After the closing tag ?> for that section (it may wrap to multiple lines), add the following code:
<?php if ($count == 1) : ?>
— Insert your Google AdSense code here —
<?php endif; $count++; ?> - Click Update File.
This places the ad within the first post. If instead you want the ad to appear between the first and second post, add the code from step 6 after the closing </div> tag for the “entry” div that contains the line <?php the_content.
Article published on June 19, 2007
If you like this article, please share it: |
Tags: Ad-Blindness, AdSense, Blog, Blogging, Google, Tips, WordPress
March 16th, 2008 at 9:40 pm
[…] 2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
March 17th, 2008 at 12:14 pm
[…] 1)Modifying Individual Posts In The Loop/修改Loop循环里面的单独日志样式- 有的时候客户有一些特别的要求,比如要让Google广告插入显示为页面中的第二篇日志,或顶部日志使用不同的背景颜色, 而其它日志只显示标题. 如果只使用一个Loop你不能完成这些工作, 这篇文章将教会如何使用不同的loops显示不同的日志风格.2)Embed Google Ad in First WordPress Post/在第一篇日志中插入Google广告-其中一个比较实用的地方就是让Google广告显示在第一篇日志后面,而不是每篇日志后面都显示。你可以使用下面的代码实现此效果: […]
March 18th, 2008 at 12:19 am
[…] 原文:Embed Google Ad in First WordPress Post 翻译: 帕兰 […]
March 21st, 2008 at 4:55 pm
Would it be possible to show Ads in the first two posts at the same time?
April 11th, 2008 at 4:04 am
[…] 2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
April 12th, 2008 at 3:04 pm
[…] 2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
April 18th, 2008 at 3:06 am
[…] Embed Google Ad in First WordPress Post […]
April 19th, 2008 at 6:46 am
[…] 原文:Embed Google Ad in First WordPress Post No Related Post wordpress […]
May 6th, 2008 at 3:28 am
[…] 2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
May 6th, 2008 at 3:28 am
[…] 2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
June 15th, 2008 at 6:53 am
[…] Embed Google Ad in first wordpress post […]
June 15th, 2008 at 11:39 pm
[…] Embed Google Ad in first wordpress post […]
June 16th, 2008 at 9:50 am
[…] 24、在第一篇文章放置广告 […]
June 16th, 2008 at 10:07 am
[…] 24、在第一篇文章放置广告 […]
June 16th, 2008 at 11:01 am
[…] 24、在第一篇文章放置广告 […]
June 16th, 2008 at 7:08 pm
[…] 24、在第一篇文章放置广告 […]
June 16th, 2008 at 9:04 pm
[…] 24、在第一篇文章放置广告 […]
June 17th, 2008 at 4:05 am
[…] 24、在第一篇文章放置广告 […]
June 17th, 2008 at 11:24 am
[…] 26.Embed Google Ad in first wordpress post […]
June 18th, 2008 at 5:53 pm
[…] 24、在第一篇文章放置广告 […]
June 18th, 2008 at 9:57 pm
[…] Embed Google Ad in first wordpress post […]
June 19th, 2008 at 4:18 am
[…] 24、在第一篇文章放置广告 […]
June 21st, 2008 at 8:15 am
[…] 24、在第一篇文章放置广告 […]
June 23rd, 2008 at 12:06 pm
[…] Añade Adsense en el primer post del blog. […]
June 23rd, 2008 at 1:42 pm
[…] Вставка AdSense в свой первый пост на блоге […]
June 25th, 2008 at 1:05 am
[…] 26. Colocar un Google Ad en el primer post de WordPress […]
June 27th, 2008 at 2:41 am
[…] Embed Google Ad in first wordpress post […]
June 30th, 2008 at 5:24 pm
[…] Añade Adsense en el primer post del blog. […]
July 2nd, 2008 at 12:45 pm
[…] 24、在第一篇文章放置广告 […]
July 9th, 2008 at 2:03 am
[…] 24、在第一篇文章放置广告 […]
July 10th, 2008 at 1:55 am
[…] 24、在第一篇文章放置广告 […]
July 11th, 2008 at 2:22 am
[…] 24、在第一篇文章放置广告 […]
July 14th, 2008 at 7:52 am
[…] 24、在第一篇文章放置广告 […]
July 15th, 2008 at 9:17 am
[…] Embed Google Ad in first wordpress post […]
July 17th, 2008 at 4:59 am
[…] Añade Adsense en el primer post del blog. […]
July 28th, 2008 at 2:26 pm
[…] 8. Embed Google Ad in First Post This cool feature allows you to add a Google Ad in the first WP post. Homepage […]
August 2nd, 2008 at 3:16 am
[…] 26. Embed Google Ad in first wordpress post […]
August 13th, 2008 at 11:49 am
[…] 24、在第一篇文章放置广告 […]
August 17th, 2008 at 4:37 am
[…] 17. How to Open links in new windows 18. How to Embed Google Ad in first wordpress post […]
August 21st, 2008 at 4:44 am
[…] 24、在第一篇文章放置广告 […]
August 21st, 2008 at 5:45 pm
[…] Добавляем AdSense в первый пост на блоге […]
August 25th, 2008 at 4:00 am
[…] Añade Adsense en el primer post del blog. […]
August 25th, 2008 at 12:16 pm
[…] 24、在第一篇文章放置广告 […]
August 29th, 2008 at 3:08 am
Hi, I tried to add the code into my wordpress, but it does not seem to work….
August 30th, 2008 at 11:49 am
[…] 26. Embed Google Ad in first wordpress post […]
September 1st, 2008 at 6:26 am
[…] 27) How to Embed Google Ad in first wordpress post […]
October 25th, 2008 at 3:08 am
[…] Embed Google Ad in first wordpress post […]
October 25th, 2008 at 2:36 pm
[…] 24、在第一篇文章放置广告 […]
November 4th, 2008 at 7:00 pm
[…] Embed Google Ad in first wordpress post […]
November 16th, 2008 at 10:33 am
Great trick! thank you very much 🙂
December 5th, 2008 at 8:21 am
不错不错Embed Google Ad in First WordPress Post
December 7th, 2008 at 10:32 am
[…] 1)Modifying Individual Posts In The Loop/修改Loop循环里面的单独日志样式- 有的时候客户有一些特别的要求,比如要让Google广告插入显示为页面中的第二篇日志,或顶部日志使用不同的背景颜色, 而其它日志只显示标题. 如果只使用一个Loop你不能完成这些工作, 这篇文章将教会如何使用不同的loops显示不同的日志风格.2)Embed Google Ad in First WordPress Post/在第一篇日志中插入Google广告-其中一个比较实用的地方就是让Google广告显示在第一篇日志后面,而不是每篇日志后面都显示。你可以使用下面的代码实现此效果: […]
January 4th, 2009 at 2:12 am
on a blog like mine i think the ads with this technique appeared too obvious and annoying so i added it into actual post instead
January 5th, 2009 at 12:08 pm
[…] 26.在第一篇WordPress日志中展示Google广告 […]
January 6th, 2009 at 1:13 pm
[…] 26.在第一篇WordPress日志中展示Google广告 […]
January 13th, 2009 at 3:33 pm
[…] 26.在第一篇WordPress日志中展示Google广告 […]
January 29th, 2009 at 12:21 pm
[…] 26.在第一篇WordPress日志中展示Google广告 […]
February 8th, 2009 at 8:42 am
[…] 26.在第一篇WordPress日志中展示Google广告 […]
February 10th, 2009 at 11:38 pm
hey, thx for sharing this, very useful for my wordpress blogs !
February 27th, 2009 at 1:18 pm
[…] Link to tutorial […]
February 28th, 2009 at 5:26 pm
Awesome site. I will be checking back frequently to see what other topics you have posted.
March 2nd, 2009 at 10:53 am
[…] 在首頁第一篇文章中嵌入Google adsense廣告 據一些知名的搜尋引擎最佳化(SEO)業者所述,把廣告放置在部落格的第一篇文章是最有效的 […]
March 3rd, 2009 at 10:51 pm
[…] 26.在第一篇WordPress日志中展示Google广告 […]
March 4th, 2009 at 8:04 pm
[…] 3. Embed Google Ad in First WordPress Post Place an ad after the first post in your WordPress blog main page. […]
March 7th, 2009 at 4:27 pm
but wordpress dosent allow ads!!!
March 13th, 2009 at 11:55 am
[…] 2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
March 14th, 2009 at 5:26 pm
I am trying to embed Google ads on my satellite tv pc site, but the ads keep showing up in a format I didn’t choose. I think this might help. Thanks.
March 26th, 2009 at 2:14 am
[…] Jika ada yang belum jelas, silakan kunjungi sumber tulisan ini disini. […]
April 21st, 2009 at 1:00 am
[…] 26.在第一篇WordPress日志中展示Google广告 […]
April 22nd, 2009 at 4:36 am
[…] Embed Google Ad in first wordpress post […]
May 15th, 2009 at 11:05 pm
[…] 26.在第一篇WordPress日志中展示Google广告 优秀的SEO(搜索引擎优化)站点会告诉你,把广告放在你第一篇日志的下方会非常有效。 27.为不同的分类创造不同的单独日志页面 能为你发表到WordPress博客不同分类的文章定制各自特定的样式。 28.使用WordPress自定区域 你能在WordPress的自定区域里放置几乎任何你想要的东西。唯一能限制你的是你的想象力。 29.生成数据存档目录 将你的每一篇日志整理到数据存档目录中,如此安排以便整理过去博客发表的日志。 30.简单一部搞定WordPress文章存档 为扫描装置提供特别准备的文章存档显示。 31.在侧边栏显示登陆框 在你的WordPress博客首页侧边栏增加一个用户登录框。 […]
May 22nd, 2009 at 4:11 pm
[…] Embed Google Ad In First WordPress Post […]
June 2nd, 2009 at 6:35 am
[…] Embed Google Ad in first wordpress postThe leading SEO (Search Engine Optimization) sites will tell youthat placing an ad after the first post in your blog’s home page isparticularly effective. […]
June 27th, 2009 at 12:47 pm
[…] Embed Google Ad in first wordpress post […]
July 7th, 2009 at 7:28 am
[…] Embed Google Ad in first wordpress post […]
July 11th, 2009 at 11:57 am
[…] Embed Google Ad in first wordpress post […]
July 25th, 2009 at 5:50 am
[…] 26.在第一篇WordPress日志中展示Google广告 […]
August 13th, 2009 at 5:54 am
[…] How to embed Google Ad in First WordPress Post […]
August 15th, 2009 at 10:17 pm
[…] Añade Adsense en el primer post del blog. […]
August 24th, 2009 at 2:46 am
[…] Embed Google Ad in first wordpress post […]
September 1st, 2009 at 7:33 am
[…] 26.在第一篇日志中展示Google广告Wordpress […]
September 6th, 2009 at 7:26 am
[…] Embed Google Ad in first wordpress post […]
September 16th, 2009 at 10:49 pm
[…] Embed Google Ad in first wordpress post […]
September 18th, 2009 at 2:22 am
[…] Embed Google Ad in first wordpress post […]
September 24th, 2009 at 1:18 pm
[…] Embed Google Ad In First WordPress Post […]
September 29th, 2009 at 3:25 pm
[…] Embed Google Ad in first wordpress post […]
October 1st, 2009 at 11:02 am
[…] Añade Adsense en el primer post del blog. […]
October 2nd, 2009 at 11:14 pm
[…] Embed Google Ad in first wordpress post […]
October 4th, 2009 at 2:52 pm
[…] Embed Google Ad in first wordpress post […]
October 8th, 2009 at 1:48 pm
[…] Embed Google Ad in first wordpress post […]
October 10th, 2009 at 11:23 pm
Thank you for this code. It works perfectly!
October 17th, 2009 at 12:08 pm
[…] How to Embed Google Ad in First WordPress Blog Post […]
October 21st, 2009 at 6:30 am
[…] Embed Google Ad in first wordpress post The leading SEO (Search Engine Optimization) sites will tell you that placing an ad after the first post in your blog’s home page is particularly effective. […]
October 27th, 2009 at 10:13 am
[…] Embed Google Ad in first wordpress post […]
October 30th, 2009 at 3:36 am
[…] 17. How to Open links in new windows 18. How to Embed Google Ad in first wordpress post […]
November 6th, 2009 at 11:06 am
[…] Jika ada yang belum jelas, silakan kunjungi sumber tulisan ini disini. […]
November 17th, 2009 at 11:06 pm
[…] 17. How to Open links in new windows 18. How to Embed Google Ad in first wordpress post […]
December 5th, 2009 at 9:17 am
[…] Añade Adsense en el primer post del blog. […]
January 4th, 2010 at 10:52 am
[…] Jika ada yang belum jelas, silakan kunjungi sumber tulisan ini disini. […]
January 21st, 2010 at 9:38 am
[…] How to Embed Google Ad in first wordpress post […]
January 25th, 2010 at 11:40 am
Can we place ads in alternative posts? I want to keep 3 post and I want to show ads on my first and third post.
February 23rd, 2010 at 12:16 pm
[…] Embed Google Ad in first wordpress post […]
February 28th, 2010 at 3:38 am
[…] Embed Google Ad in First WordPress Post […]
March 17th, 2010 at 8:07 pm
[…] Embed Google Ad in first wordpress post […]
March 19th, 2010 at 2:02 am
[…] Embed Google Ad in first wordpress post The leading SEO (Search Engine Optimization) sites will tell you that placing an ad after the first […]
March 22nd, 2010 at 9:56 am
[…] How to Embed Google Ad in first wordpress post […]
March 30th, 2010 at 11:52 am
[…] 17. How to Open links in new windows 18. How to Embed Google Ad in first wordpress post […]
April 2nd, 2010 at 11:51 pm
[…] 17. How to Open links in new windows 18. How to Embed Google Ad in first wordpress post […]
April 6th, 2010 at 12:20 pm
[…] 26.在第一篇WordPress日志中展示Google广告 […]
April 9th, 2010 at 7:02 am
[…] 26.在第一篇WordPress日志中展示Google广告 […]
April 29th, 2010 at 3:34 pm
[…] 9· Embed Google Ad in first wordpress post […]
May 15th, 2010 at 10:13 am
[…] Embed Google Ad in first wordpress post […]
May 15th, 2010 at 8:56 pm
[…] Añade Adsense en el primer post del blog. […]
May 22nd, 2010 at 4:10 pm
[…] Embed Google Ad in first wordpress post The leading SEO (Search Engine Optimization) sites will tell you that placing an ad after the first post in your blog’s home page is particularly effective. […]
June 5th, 2010 at 12:59 pm
[…] 26. Embed Google Ad in first wordpress post […]
June 13th, 2010 at 2:25 pm
[…] How to Embed Google Ad in first wordpress post […]
June 25th, 2010 at 5:12 pm
[…] Embed Google Ad in first wordpress post […]
August 2nd, 2010 at 10:07 pm
[…] Jika ada yang belum jelas, silakan kunjungi sumber tulisan ini disini. […]
August 9th, 2010 at 12:41 pm
[…] Embed Google Ad in first wordpress post […]
September 1st, 2010 at 8:24 am
[…] Embed Google Ad in first wordpress post […]
September 2nd, 2010 at 9:02 am
[…] How to embed Google Ad in First WordPress Post […]
September 22nd, 2010 at 9:48 am
[…] 26.在第一篇文章放置广告 […]
October 10th, 2010 at 7:15 am
[…] 原文:Embed Google Ad in First WordPress Post […]
October 14th, 2010 at 3:29 am
[…] 1)Modifying Individual Posts In The Loop/修改Loop循环里面的单独日志样式- 有的时候客户有一些特别的要求,比如要让Google广告插入显示为页面中的第二篇日志,或顶部日志使用不同的背景颜色, 而其它日志只显示标题. 如果只使用一个Loop你不能完成这些工作, 这篇文章将教会如何使用不同的loops显示不同的日志风格. 2)Embed Google Ad in First WordPress Post在第一篇日志中插入Google广告-其中一个比较实用的地方就是让Google广告显示在第一篇日志后面,而不是每篇日志后面都显示。你可以使用下面的代码实现此效果: View Code PHP1 2 3 <?php if ($count == 1) : ?> // Insert your Google AdSense code here <?php endif; $count ; ?> […]
October 24th, 2010 at 3:09 pm
[…] comentarios de los Trackbacks/ Pingbakcs ( En castellano)Utiliza Writely para escribir en tu BlogAñade Adsense en el primer post del blog.Crea multiples posts para diferentes categoríasUsando los “Custom Fields” del panel de […]
November 12th, 2010 at 4:59 am
[…] Embed Google Ad in first wordpress post […]
November 18th, 2010 at 3:17 pm
[…] Embed Google Ad in First WordPress Post One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop. […]
January 5th, 2011 at 1:11 pm
[…] Embed Google Ad in first wordpress post […]
January 15th, 2011 at 10:17 am
[…] Embed Google Ad in first wordpress post […]
January 29th, 2011 at 4:03 am
[…] 24、在第一篇文章放置广告 […]
February 18th, 2011 at 2:28 am
[…] Embed Google Ad in first wordpress post […]
February 24th, 2011 at 9:03 am
[…] 26) Embed Google Ad in first wordpress post […]
March 28th, 2011 at 9:37 am
[…] Embed Google Ad in first wordpress post […]
March 31st, 2011 at 5:15 am
[…] Jika ada yang belum jelas, silakan kunjungi sumber tulisan ini disini. […]
May 9th, 2011 at 11:53 pm
[…] 原文:Embed Google Ad in First WordPress Post […]
May 13th, 2011 at 10:28 pm
[…] away effect on blogSeperate Comments from Trackbacks/PingbacksBlog Alone or Together with WritelyEmbed Google Ad in first wordpress postCreating multiple single posts for different categoriesUsing WordPress Custom FieldsCreating an […]
May 17th, 2011 at 12:05 am
[…] Añade Adsense en el primer post del blog. […]
June 7th, 2011 at 4:27 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
June 7th, 2011 at 5:59 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
June 10th, 2011 at 1:27 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
June 15th, 2011 at 12:44 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
June 28th, 2011 at 1:15 pm
[…] How to Embed Google Ad in first wordpress post […]
June 29th, 2011 at 11:12 pm
[…] How to Embed Google Ad in first wordpress post […]
June 30th, 2011 at 9:39 pm
[…] Embed Google Ad In First WordPress Post […]
September 1st, 2011 at 4:00 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
September 11th, 2011 at 4:05 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
September 22nd, 2011 at 10:41 am
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
September 30th, 2011 at 12:10 am
[…] Display Twitter messages in WordPress38. Dynamic jQuery Feature Post Slider For WordPress39. Embed Google Ad (AdSense) in first wordpress post40. Exclude certain categories from being displayed41. Exclude Post from WordPress Feed42. Exclude […]
October 2nd, 2011 at 3:17 am
[…] Embed Google Ad in first wordpress post […]
October 19th, 2011 at 1:33 am
[…] Embed Google Ad In First WordPress Post […]
February 20th, 2013 at 3:40 pm
[…] 39. Embed Google Ad (AdSense) in first wordpress post […]
March 19th, 2013 at 1:57 pm
[…] 1. Efficient Google Ads for Home Page […]
September 25th, 2013 at 9:37 pm
[…] Embed Google Ad In First WordPress Post […]
December 18th, 2013 at 1:12 am
[…] Embed Google Ad in first wordpress post […]
January 12th, 2014 at 1:24 pm
[…] Embed Google Ad in first wordpress post […]
October 15th, 2014 at 10:27 pm
[…] Embed Google Ad in First WordPress Post […]
May 10th, 2015 at 12:05 pm
[…] Embed Google Ad in first wordpress post […]
June 10th, 2015 at 8:48 am
[…] Embed Google Ad In First WordPress Post […]
March 7th, 2016 at 8:08 pm
[…] Embed Google Ad in first wordpress post […]
July 5th, 2016 at 1:03 pm
[…] Embed Google Ad in first wordpress post […]