not to show ads on certain category/threads


Well-known member

running a forum is good on adsense due to users are the one posting infos for you.
the sad part is users tends to post certain topics thats not allowed in their policy
like sexy pics, latest celebrity scandals.

with just one post and google found it out.
your site will be flagged and after 3days your site will be disabled from adsense.

is there a way for the XF ad templates not to show on specific category you
set in your forum?

say you create a
SEXY/NSFW section.
so any threads posted in that section the AD Templates will not load there.

its really a must for General Topic Daily Life Forum sites
as topic goes anywhere from ants to stars

Jake Bunce

XenForo moderator
Staff member
Create a new style that will be used in the nsfw forum:

Admin CP -> Appearance -> Styles -> Create New Style

Set the parent to the other style when creating the new style, then remove the ad code from the child style. It will be identical to the parent, minus the ads.

Then assign that style to the nsfw forum:

Admin CP -> Applications -> Display Node Tree -> [click the forum] -> Override user style choice

Screen shot 2011-03-14 at 11.26.02 PM.png