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

XF 1.1 Display adverts/text for guests only

Discussion in 'XenForo Questions and Support' started by Neal, Mar 8, 2013.

  1. Neal

    Neal Well-Known Member

    I want to have the adverts on my website show to guests only. What code do I need to enter above and below my google adsense code please?
  2. MattW

    MattW Well-Known Member

    Neal likes this.
  3. melbo

    melbo Well-Known Member

    <xen:if is="!{$visitor.user_id}">
    EvilSS and Neal like this.
  4. Neal

    Neal Well-Known Member

    Thank you. Now I feel silly. :notworthy:
  5. ProCom

    ProCom Active Member

    A quick follow up: If I only want to show the ads to visitor and also "regular" members, but not to paid members, how would the code be edited? For example:

    Show ads only to visitor and members, but not to "premium members"

  6. Brogan

    Brogan XenForo Moderator Staff Member

    RoldanLT, ProCom, Neal and 1 other person like this.
  7. ProCom

    ProCom Active Member

    Excellent, thanks!!
  8. Chris Radford

    Chris Radford Active Member

    Sorry to bump an old thread but it's relevant. Reference:

    <xen:if is="!{xen:helper ismemberof, $visitor, x}">
    This content will be hidden from members of user group x
    How do I go about editing this so the content can be hidden from several usergroups. Specifically - Admins/Mods/Paid users.

    Also how do I identify the code for each usergroup. IE visitors = $visitor

    Many thanks for any assistance,
  9. Brogan

    Brogan XenForo Moderator Staff Member

    The link in my post above explains how to create a conditional statement for multiple user groups.

    The ID for each user group can be seen by clicking on the user group in the ACP and looking at the browser address bar.

    Chris Radford and Neal like this.

Share This Page