Is there a way to hide the built in adsense placement in the header and footer from a certain usergroup?
Hiding adsense ads from a certain usergroup
Collapse
X
-
If you edit the header/footer template and wrap the AdSense Code/template call in the following (change the usergroup number to the one you wish to hide it from):
Code:[COLOR=#FF0000] <if condition=[COLOR=#0000FF]"$post['usergroupid'] != 6"[/COLOR]>[/COLOR][COLOR=#FF0000][I][COLOR=black]AdSense Template call[/COLOR][/I]</if>[/COLOR]
-
That depends on how you're adding the AdSense code! Are you using the inbuilt Google AdSense integration?Comment
-
Sorry, long day....
navbar template, change:
Code:$ad_location[ad_navbar_below]
Code:[COLOR=#ff0000] [COLOR=black]<if condition=[/COLOR][COLOR=black]"$post['usergroupid'] != 6">[/COLOR][/COLOR][COLOR=black]$ad_location[ad_navbar_below][/COLOR][COLOR=black]</if>[/COLOR]
Code:$ad_location[ad_footer_start]
Code:[COLOR=#ff0000] [COLOR=black]<if condition=[/COLOR][COLOR=black]"$post['usergroupid'] != 6">[/COLOR][/COLOR][COLOR=black]$ad_location[ad_footer_start][/COLOR][COLOR=black]</if>[/COLOR]
Obviously, as before, change the number to the usergroup you wish to hide these from.Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment