Adsense help!

Discussion in 'AdSense' started by BigBwoy, Jan 27, 2011.

  1. #1
    Hi all DP's!
    I have a problem regarding AdSense.
    I just can't run both Ad Unit and Link Unit at the same time on the same webpage. There should also be a link unit between the first 5 thumbnails and the last 5 thumnails. I found that the limit is 3 Ad Units and 3 Link Units on the same page and I don't see this matter as an inconvenience for my situation.
    Here is the home.php code:
    <?php get_header(); ?>
    
    <div id="hfeat">
    
    <?php
    $gohomecount = get_option('iwatch_gohome');
    
    global $customFields;
    $customFields = "'gohome'"; 
    $customPosts = new WP_Query();
    add_filter('posts_join', 'get_custom_field_posts_join');
    add_filter('posts_groupby', 'get_custom_field_posts_group');
    $customPosts->query('post_type=any&'.$gohomecount.'' );
    remove_filter('posts_join', 'get_custom_field_posts_join');
    remove_filter('posts_groupby', 'get_custom_field_posts_group');
    while ($customPosts->have_posts()) : $customPosts->the_post();
    $links = get_post_custom_values("gohome");
    $do_not_duplicate[] = $post->ID ?>
    
    <div class="posthome">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
    <img style="width: 180px; height: 180px;border: 5px ridge #ededed;" src="<?php echo catch_that_image() ?>"/></a>
    
    <div class="htitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php if (strlen($post->post_title) > 22) {
    echo substr(the_title($before = '', $after = '', FALSE), 0, 22) . '...'; } else {
    the_title();
    } ?></a></div>
    
    <div class="time"> <?php the_time('F j, Y'); ?> </div>
    <div class="com"> <?php comments_popup_link('Add a comment', '1 comment', '% comments'); ?></div>
    
    <script type="text/javascript"><!--
    google_ad_client = "pub-5716885116443636";
    /* 728x15, created 27/01/11 */
    google_ad_slot = "2953505571";
    google_ad_width = 728;
    google_ad_height = 15;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    
    </div>
    	
    <?php endwhile; ?> 
    
    </div>
    
    <div id="hrec">
    
    <span class="ht"> Recent Entries </span>
    
    <?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post();
    if (in_array($post->ID, $do_not_duplicate)) continue;
     update_post_caches($posts); ?>
    
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    
    
    <div class="posthome">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
    <img style="width: 180px; height: 180px;border: 5px ridge #ededed;" src="<?php echo catch_that_image() ?>"/></a>
    
    
    <div class="htitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php if (strlen($post->post_title) > 22) {
    echo substr(the_title($before = '', $after = '', FALSE), 0, 22) . '...'; } else {
    the_title();
    } ?></a></div>
    
    <div class="time"> <?php the_time('F j, Y'); ?></div>
    <div class="com"> <?php comments_popup_link('Add a comment', '1 comment', '% comments'); ?></div>
    
    
    
    </div></div>
    
    <?php endwhile; ?><?php else : ?><?php endif; ?>
    
    <div class="navigation">
    
    <p align="center"><script type="text/javascript"><!--
    google_ad_client = "pub-5716885116443636";
    /* 728x90, created 27/01/11 */
    google_ad_slot = "3453877544";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></p>
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
    			else { ?>
    
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    				<?php } ?>
    
    		</div>	
    
    <div id="sidehorz">
    <?php include (TEMPLATEPATH . '/twitwdg.php'); ?>
     <?php include(TEMPLATEPATH."/sidebar.php");?>
     <?php include(TEMPLATEPATH."/sidebar2.php");?>
     <?php include(TEMPLATEPATH."/sidebar3.php");?>
    </div>
    
    </div>
    
    <?php get_footer(); ?>
    Code (markup):
    What's the problem?
    Thanks in advance!
     
    BigBwoy, Jan 27, 2011 IP
  2. FireStorM

    FireStorM Well-Known Member

    Messages:
    2,579
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    175
    #2
    why you cannot add both set of ads ?
     
    FireStorM, Jan 27, 2011 IP
  3. BigBwoy

    BigBwoy Peon

    Messages:
    208
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's what I am asking :)
     
    BigBwoy, Jan 27, 2011 IP
  4. BigBwoy

    BigBwoy Peon

    Messages:
    208
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    C'mon! Nobody knows?
     
    BigBwoy, Jan 28, 2011 IP
  5. nich0las

    nich0las Active Member

    Messages:
    288
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    95
    #5
    Do either of them work or both not working
    What if you remove one, then the other.
    Do some more testing then come back and report
     
    nich0las, Jan 28, 2011 IP