August 21, 2009

WordPress: Homepage Ads ONLY After The First Article

Have you ever wondered how to show Google ads on your WordPress blog’s home page, but only after the very first article? Well, here is how you do it. And don’t worry, it’s quite simple, and you can’t permanently damage anything by giving it a try. ANYONE can do this!

1. In the PRESENTATION menu, under THEMES EDITOR, find the theme file called “Main Index Template” (index.php).
2. FIRST: Copy and paste everything you see here into a blank text file and save it. This way if you screw something up you can revert back to the original without hurting anything.
3. Find a line of code that looks much like the following:
4. Immediately after that, paste the following: ENTER YOUR AD CODE HERE
5. Save the document and refresh your page. You should see the ad ONLY after the first article on the homepage.


If it doesn’t show up in the right place, just try moving it around a bit and use a little trial and error. Also, remember to disable WP-Cache while you are testing the changes. If your pages are cached you won’t see the changes and it might throw you off a bit. You can enable it after you are satisfied.

No comments: