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

XF 1.3 Hide elements if visitor is in a group


I have 2 elements (ads) to hide if my visitor is logged and if he's in a special group (number 19). But I can't find how to do it.
  • Hide a widget. I have found XenForo_Template_Helper_Core::callHelper('ismemberof', array($visitor,19)). But, I want to show the widget to everybody, except for members in the group.
  • Hide some content in template. I would hide a banner in my header template. How can i put in xenforo style :
<?php if($utilisateur=>group !=3)
echo 'Show my ads';
Thanks for the help..


XenForo moderator
Staff member
Assuming you are editing a template, use a user group conditional statement.

<xen:if is="!{xen:helper ismemberof, $visitor, x}">