How to I move the adsense script ?
-
How do I move the Adsense script from the top of 2nd post to the top of 1st post ?
my blog : http://cruisetaiwan.com/blog
Here’s my main index template code :
<?php
get_header();
?>
<?php
$postnum = 1;
$showadsense = 1; // 1 = First Post
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post">
<h2 id="post-<?php the_ID(); ?>"><a>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="meta"><?php _e("Blogged under"); ?> <?php the_category(',') ?> <?php _e("by")?> <?php the_author() ?> <?php _e("on");?> <?php the_time('l j F Y'); ?> <?php _e("at");?> <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div>
<div class="storycontent">
<?php the_content(__('(more...)')); ?>
</div>
<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
</div>
</div>
<br>
<?php if ($postnum == $showadsense) { ?>
<script type="text/javascript"><!--
google_ad_client = "abc123";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
google_ad_channel ="2079193797";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php } $postnum++; ?>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
<?php get_footer(); ?>
——————–Pls advise
Thanks !
- The topic ‘How to I move the adsense script ?’ is closed to new replies.