• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Ad Placement; ad_above_top_breadcrumb to NOT be displayed in threads ?

STORMS

Active member
#1
I would like to use Google Adsense in the "ad_above_top_breadcrumb" section.
But, I do NOT want the ads to load above threads. Can someone please tell me if there is a way to do this?
 

Brogan

XenForo moderator
Staff member
#3
For reference, if you want to exclude it from more than one template, use an array:

<xen:if is="!in_array({$contentTemplate}, array('error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'login', 'error_with_login', 'thread_view'))">
 

STORMS

Active member
#5
Use a conditional statement:

<xen:if is="{$contentTemplate} != 'thread_view'">
Code
</xen:if>
I went with this code, but there are forums that the above code doesn't work with and ads are still displayed.
It works with every other forum and the forums that it does not work with are the newest. Are there any reasons as to why this would occur?
 

Brogan

XenForo moderator
Staff member
#6
The above code is to stop it being shown in a thread - i.e. the page you're on now.

What were you after?