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?
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?
I don't think 'leaderboard' is actually a valid PHP function, perhaps you would be better off with:
if(function_exists('adsense_deluxe_ads')) {
adsense_deluxe_ads('leaderboard');
}
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!!
This topic has been closed to new replies.