XF 2.1 Hide Staff Bar option



We have a custom URL set up to appear on the Staff Bar across using the below code.

<xf:if is="$xf.visitor.is_moderator"> <a href="URL HERE" class="p-staffBar-link"><span class="button-text">Add Product to Catalogue</span></a> </xf:if>

However, the only people we want to see this are Admins and Moderators. This sort of works but is there a way we can set it so forum-moderators are unable to see it? We only want full moderators to see it and those who are mods of specific forums won't require it.

Kind Regards,


XenForo moderator
Staff member
You will need to change the conditional statement from <xf:if is="$xf.visitor.is_moderator"> to something which only applies to the members who should see the URL - using member IDs in an array should work.