Support » Fixing WordPress » Adding Adsense-deluxe to single.php

  • Resolved GadeTerbob


    This code works when added to single.php:
    <?php adsense_deluxe_ads('leaderboard'); ?>

    While this doesn’t:
    <?php if(function_exists('leaderboard')): adsense_deluxe_ads('leaderboard'); endif; ?>

    No error, just doesn’t work. What am I missing?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I don’t think ‘leaderboard’ is actually a valid PHP function, perhaps you would be better off with:

    if(function_exists('adsense_deluxe_ads')) {

    To check that adsense is installed before calling your ads, if you want to check that the actual ads exist, you could try something like (note: untested):

    if(function_exists('adsense_deluxe_ads')) {
      $options = get_option('acmetech_adsensedeluxe');
      if(isset($options['ads']['leaderboard']))     adsense_deluxe_ads('leaderboard');

    Thanks! To check if the ad option exits is my goal. I’ll test the code.

    Let me know if you have any issues with it at all.

    Yup! Works good and lasts a long time!! Thanks!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding Adsense-deluxe to single.php’ is closed to new replies.