Support Forum
I got the ad to show but no white background. It seems that the php code is adding another section under the original.
Ill start fresh.
In each group you have your: Group Name, Description, Select Custom Icon and Special group message to be displayed above forums.
I use the special group message to display my ads. When adding anything in this field it gives a white background so you can read the text. I will add text to the special group message for you to see what im talking about. It will say "Here". You will see that it pushes the ad under the section.
I want the ad to be in this field and not under it.
All im looking for is the adsense ad to work in the special group message.
Milwaukee Auto Market is a very dynamic community to buy, sell or trade any automotive products.
Hmmm that's weird. Maybe I need to clear my cache. It caches the front page to everyone not logged in.
I have 4 groups. The first one is what i'm working on. The other 3 already have ads from Amazon and Clickbank. They all work in the special message field. The adsense code will not work in the special message field.
Here is a screenshot on what i'm talking about incase clearing the cache doesn't work. And if it doesn't work, then I have more problems then I thought.
Milwaukee Auto Market is a very dynamic community to buy, sell or trade any automotive products.
The ad you showed is just a picture with a link to a clickbank product.
The other 2 are amazon ad codes.
The one I showed is adsense.
I just looked at it in mobile view on a different IP. The adsense ad doesn't show at all. But the amazon ads do. I also have an adsense ad in the footer that did show.
I cleared all cache and browser with the same result.
So now I have 2 problems. I can't get the adsense ad to show in the box. And why are coded ads not showing up for people in the special message box?
I have amazon coded ads all over with articles that display fine.
I'm thinking there is something with the special message section that's not allowing the code to display properly or at all. All my ad codes work outside the forums.
Milwaukee Auto Market is a very dynamic community to buy, sell or trade any automotive products.
Here is the code I used in the functions.php to show the adsense ad in that screenshot. Maybe there is something missing?
I did just look at it on another IP and the amazon ads do show but not the adsense. Not to sure what I should do about this. Seems there is a bit of work on hand to get coded ads to work properly in the special message section.
add_filter('sph_GroupHeaderMessage', 'my_header');
function my_header($out) {
global $spThisGroup;
if ($spThisGroup->group_id == 2) {
# add adsense to $out here
$out.= '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Milwaukee Auto Auctions -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-8679649126112925"
data-ad-slot="1353012698"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>';
}
return $out;
}
?>
Milwaukee Auto Market is a very dynamic community to buy, sell or trade any automotive products.
So I too am seeing adsense ads on your forum group view... pretty much the code you showed here... plus the 'here'... was that ad output another way?
this code definitely works - just tested it and your ad shows...
add_filter('sph_GroupHeaderMessage', 'my_header'); function my_header($out) { global $spThisGroup; if ($spThisGroup->group_id == 2) { # add adsense to $out here $out.= '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!– Milwaukee Auto Auctions –> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-8679649126112925" data-ad-slot="1353012698"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>'; } return $out; }
important.. your code (at least as pasted above) has some invalid quote characters... please try copying the code above using the raw code button and then copying (dont just copy text from the forum display) to ensure you get proper quotes...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)