Support » Plugins » Adsense-Deluxe, The Loop, & Sidebar

  • I’m using the Adsense Deluxe plugin on WP 2.0 and I’m having a little trouble. I have an Adsense add at the end of my sidebar. It was working fine on all pages of my site until I added another Adsense ad via the loop. Now the sidebar ad fails to show on the main (index) page, but shows in other views, such as on a static page or when viewing only one post.
    The new Adsense ad that I added via the loop is set to show between the first and second post on the main page and works fine. Please note that this new add doesn’t put me over the 3 ad limit that Google imposes. I have only that one ad in the loop, the one in the side bar, and 2 referral ads (Firefox w/ Google Toolbar at top of sidebar and Google Pack in footer).
    Below is the code of my index file. The ad that is now failing to show on the main page sidebar but still shows on other pages in the side bar is represented by

    <?php adsense_deluxe_ads('ss'); ?>

    Here’s the index code…

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <head profile="">
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php wp_head(); ?>
    <body id="home">
    <div id="rap">
    <?php get_header(); ?>
    <div id="content">
    <?php $post_counter=0; ?>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="post">
    <?php require('post.php'); ?>
    <?php comments_template(); // Get wp-comments.php template ?>
    <?php $post_counter++; if ($post_counter == 1) { ?>
    <?php adsense_deluxe_ads(); ?>
    <?php } ?>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link() ?>
    <div id="sidebar">
    <?php adsense_deluxe_ads('ff'); ?>
    <h2><?php _e('About the Site:'); ?></h2>
    <li><?php bloginfo('description'); ?></li>
    <h2><?php _e('Links'); ?></h2>
    <ul><?php get_links('-1', '
    <li>', '</li>
    ', '', FALSE, 'id', FALSE,
    FALSE, '-1', FALSE); ?></ul>
    <?php get_sidebar(); ?>
    <h2><?php _e('Meta'); ?></h2>
    <?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    <?php wp_meta(); ?>
    <?php adsense_deluxe_ads('ss'); ?>
    <?php get_footer(); ?>

    Can anyone tell me what I am doing wrong? I have very little understanding of php.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adsense-Deluxe, The Loop, & Sidebar’ is closed to new replies.