Archive

Posts Tagged ‘google adsense’

$ add adsense under each wordpress post by hand code $

October 12th, 2008 No comments

Sometimes I dont like to use plugin to add adsense in the blog, so I tried to add it by hand code, following is an example for add adsense under each post:

Go to the file of single.php in the theme fold, read and find the code for displaying the content, the <div class=”storycontent”> should be the code to display the content, and the <div class=”meta”> should be the code to show the post meta, so just add the script under the the post meta, I use the <hr> to isolate adsense for clearance.

<div class=”storycontent”>
<?php the_content(__(‘(more…)’)); ?>
</div><!– end storycontent –>

<div class=”meta”>

Written by <?php the_author() ?><?php _e(” in:”); ?> <?php the_category(‘,’) ?> | <?php the_tags(__(‘Tags: ‘), ‘, ‘, ‘ ‘); ?><?php edit_post_link(__(‘Edit This’)); ?>
<?php wp_link_pages(); ?><br />

</div><!– end meta –>

<hr>
******paste google adsense script here*************
<hr>

Related Blogs

The page for google adsense search result

October 9th, 2008 No comments

Following is a quite simple html page I made for google adsense search result:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” lang=”UTF-8″>
<head>
</head>
<body>

<div align = “center”>

****google adsense search result code*****

</div>

</body>
</html>

I dont know what is the meaning of the first 2 lines:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” lang=”UTF-8″>

Categories: google adsense Tags: