WordPress.org

Ready to get started?Download WordPress

Forums

Adsense-Deluxe, The Loop, & Sidebar (2 posts)

  1. DetroitMark
    Member
    Posted 7 years ago #

    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/1">
    <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'); ?> );
    </style>
    <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(); ?>
    </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 } ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <p align="center"><?php posts_nav_link() ?>
    </div>
    <div id="sidebar">
    <?php adsense_deluxe_ads('ff'); ?>
    <h2><?php _e('About the Site:'); ?></h2>
    <ul>
    <li><?php bloginfo('description'); ?></li>
    </ul>
    <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>
    <ul>
    <?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    <?php wp_meta(); ?>
    </ul>
    <?php adsense_deluxe_ads('ss'); ?>
    </div>
    <?php get_footer(); ?>
    </div>
    </body>
    </html>

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

  2. DetroitMark
    Member
    Posted 7 years ago #

    Nevermind, apparently the code was solid and the ad is showing up now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags