Just because I’m an old and long time software developer, I decided to dig the problem and… I found it and fixed.
I don’t know nothing about wordpress, as a developer, and know just bits of php.
I’m using a theme which implements in the theme options an advertisment manager. To make my ads work, I had to fill a textfield in the theme options. By doing it, my ads started to work (this happened like 5 minutes after my 1st post).
But… I never liked it, because there is no options around this manager and its general behaviour was not satisfying me…
So, today I had 20 minutes to spend for me and…
– I found a file, shortcodes.php, in the “library” folder of the theme.
– in this file I replaced this line
add_shortcode('ad', 'theme_advertisement');
with
//add_shortcode(‘ad’, ‘theme_advertisement’);
then I checked what the
function theme_advertisement
really does…
Well, in 5 seconds I decided that It wuold have been better to comment it… LOL
From this
function theme_advertisement($atts){
extract(shortcode_atts(array(
'code' => 1,
'align' => 'left',
'inline' => 0
), $atts));
$ad = theme_get_option('theme_ad_code_'.$code);
if(!empty($ad)):
$ad = '<div class="ad align'.esc_attr($align).'">'.$ad.'</div>';
if(!$inline) $ad .= '<div class="cleared"></div>';
return $ad;
else:
return '<p class="error"><strong>[ad]</strong> '.sprintf(__("Empty ad slot (#%s)!",THEME_NS),esc_attr($code)).'</p>';
endif;
}
to this
/*
function theme_advertisement($atts){
extract(shortcode_atts(array(
'code' => 1,
'align' => 'left',
'inline' => 0
), $atts));
$ad = theme_get_option('theme_ad_code_'.$code);
if(!empty($ad)):
$ad = '<div class="ad align'.esc_attr($align).'">'.$ad.'</div>';
if(!$inline) $ad .= '<div class="cleared"></div>';
return $ad;
else:
return '<p class="error"><strong>[ad]</strong> '.sprintf(__("Empty ad slot (#%s)!",THEME_NS),esc_attr($code)).'</p>';
endif;
}
*/
TL;RT
There was another ad catcher in the code, so the advertising manager functionality was overridden by another piece of software, which was set in the theme options (not as plugin).
I hope this might help someone else.
Happy coding