XF 1.4 ads appearing in privacy policy

trman

Active member
I added adsense to the ad_above_top_breadcrumb template. I didn't want it to appear in my privacy policy page, which is node 12 so I enclosed the adsense code in this:

<xen:if is="{$forum.node_id} != 12">
adsense code here
</xen:if>

I have also tried:

<xen:if is="{$page.node_id} !=12">
adsense code here
</xen:if>

However the ads still appear in my privacy policy page.

What do I need to change? Please be specific as I am new to XenForo
 
In the page template, try putting the following code:
HTML:
<xen:if is="{$page.node_id} != 12">
{$page.node_id}
</xen:if>
See if that displays anything, if it does, then your node_id value is not 12.
 
It is definitely 12, I can hover my pointer over the link in the node manager and it shows 12.

Still not able to prevent the ads from appearing at the top of my privacy policy.
 
Do you have templates parsed as files, or perhaps some caching mechanism that may be using an old version of the template?

I have this issue randomly, and sometimes need to restart the webserver, or turn off the option to store templates as files when I'm making some changes.

Are you sure you are changing the correct template for the style you have enabled?
 
Thanks for your reply.

I do have templates as files, however other changes I make in the ad templates show up immediately.

Yes, it is the correct template, it is the ad_above_top_breadcrumb template. I can remove the ad code completely and the ads will stop showing up right away for all the forum and pages. When I put the code back in, the ads show up right away. However I can not exclude them from the privacy policy (and other page nodes, like terms of use)
 
Top Bottom