1. 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 ?

Discussion in 'Forum Management' started by STORMS, Aug 22, 2013.

  1. STORMS

    STORMS Active Member

    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?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Use a conditional statement:

    <xen:if is="{$contentTemplate} != 'thread_view'">
    Code
    </xen:if>
     
    STORMS likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    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 likes this.
  4. STORMS

    STORMS Active Member

    Thank you very much!
     
  5. STORMS

    STORMS Active Member

    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?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    The above code is to stop it being shown in a thread - i.e. the page you're on now.

    What were you after?
     

Share This Page