Friday, May 9, 2008

How to: Add Adsense Ads to the Footer of each Post

avatar_000011.jpg
You have added advertisements to your sidebar but now you want to include them in the footer of each post. There are no sidebars for posts. So how to accomplish this?

It is not to difficult. You will need to update the theme itself. Yes, the theme. In addition, whenever you switch themes you will need to update the new theme as well.


These instructions will use the theme ‘leggorao’, which is included in the Flatpress Blog Engine installation software. Only the file ‘entry-default.tpl’ is updated.

You can edit this file directly on your website using a tool such as PsPad with it is built in FTP connection. Alternatively, you can use the 110MB file manager. Using the file manager will cause your site not to function for a brief period of time because the file ‘entry-default.tpl’ must be renamed in order to upload the updated file.

The location of file ‘entry-default.tpl’ is determined by the name of the theme and the folder Flatpress was installed into. If Flatpress was installed in its default location, the file is located in the folder flatpressfp-interfacethemesleggorao.

Step-by-Step Instructions

Preparation
1) Go to your adsense account
2) Select an adsense banner ad with the dimensions 480×60
3) Copy the code and save it in a file for now

Updating Theme
4) Log onto www.110mb.com using your web site account
5) Click on the file manager image
6) Click on the folder flatpress if that is the directory was installed in. Otherwise, click on the appropriate folder
7) Click on fp-interface > themes > leggaorao
8) To the right of the file entry-default.tpl , click on download and save the file to your PC.
9) Edit entry-default.tpl

  • You will add some html code between {$content|tag:the_content} and <ul class=”entry-footer”>
  • First add <div style=”text-align: center;”> . This will center the ad in the post.
  • Next add <br>. This will add a blank line between the bottom of the post and the ad.
  • Add your adsense code you to obtained earlier
  • Finally add </div>. This ends the DIV command started earlier.

post_ad_002.jpg
10) Save your file changes
11) Go back to 110mb file manager
12) Rename the current file entry-default.tpl to entry-default_old.tpl
13) Update the updated entry-default.tpl on your PC to your website.
14) Go to your Flatpress blog site and log into it.
15) Go to the admin panel > maintain. Click on # Purge entry cache and # Purge theme and templates cache .
16) Go to your Flapress blog home page you should as least see a space for advertisments. Sometimes googles take some time before ads start showing up.

Conclusion

You should now have advertisements automatically appearing at the bottom of most of your post. On my site only the first three posts get advertisements. If you change your theme, you will need to make same change to it as well.

If you try this procedure with other themes, leave a comment about the theme you used along with any custom procedures you used.

Related Posts


Translate

website translation

Bookmark Site

Bookmark and Share

Website Support

This site is not an Affiliate of FlatPress.org

Last 3 comments

Admin area