Davao Wordpresser

Subscribe to Davao Wordpresser

feed icon Subscribe to Davao Wordpresser via RSS
or subscribe via email:


    Written on Wednesday, February 6th, 2008 at 3:52 am by dwordpresser



How to Place Google Adsense In Your Posts



If you tried at one time to place some adsense code in your post, you might have found out that it doesn’t work. The reason for this is that Wordpress filters out your posts for programming codes and unwanted html codes upon publishing to avoid conflict with Wordpress’ programming as well as for some other security reasons. This includes javascripts which Google adsense is created with.

If you want to place google ads in your posts, there are two ways to do it. One is to edit your theme and place your adsense codes right in the theme file. This requires a bit of php programming so I won’t really delve into this topic for this entry. The other option which I want to focus on for now is to install the exec-php plugin which can be downloaded here.

1. Download the extracted exec-php.zip file in your online installation using ftp in the wp-content/plugins/ folder

2. Activate the plug-in in your admin panel

3. Create a new entry to test the plugin

4. In the text editor, click the “code” tab right beside the “visual” tab

5. Copy your adsense code and paste it there (when you switch the editor to the visual editor, the adsense cannot be seen)

6. Publish the entry

7. Check if the adsense code displayed well in the front page

The plug-in actually disables the Wordpress feature that filters out the entries from programming language. This allows both php and javascript to be executed even in posts.

Note: Google adsense a maximum of four ads only within a page. This could cause the remaining adsense exceeding the number not to appear.

6 Responses to “How to Place Google Adsense In Your Posts”

    Hello bro!

    Musta? Ibig sabihin ba nito di pwede automatic magkakaroon ng adsense ang lahat ng posts ko?

    Sorry. Medyo di ko talaga forte ang pagiging webmaster eh. :)



    Hi Dave,

    If you use this method, you would have to place your adsense code each time you make a post. If you want the adsense to appear automatically, you would have to hardcode/embed it in the theme itself. :)



    Ok ‘yan ah pero kakapagod magcopy and paste hehehe.



    Parang ganon nga, hehe. Salamat sa pag-daan.. :)



    Hi! Tanong ko lang anong ibig sabihin ng “ftp” sa step no. 1. Download the extracted exec-php.zip file in your online installation using ftp in the wp-content/plugins/ folder



    Hi Thel,

    FTP stands for File Transfer Protocol. It is basically a method where you transfer files from your computer to your domain and vice versa. You can download a free program for this, FileZilla at http://filezilla-project.org. Then try to install and learn the program. Of course, to use it, you need to have basic knowledge on domains and hosting services for your website :)



Leave a Reply

© 2010 Davao Wordpresser | Entries (RSS) and Comments (RSS)

wordpress logo