XF 2.2 Right sidebar question

Spartan

Well-known member
I have a right sidebar set up for ads. Is it possible to eliminate the sidebar for a specific user group? I offer no ads for those who pay a fee, and would like to eliminate the sidebar for this group.
 
I have a right sidebar set up for ads.

If you mean you are doing this with the default xenForo Ad positions it will not work unless the sidebar has other content, ie other widgets as well because the sidebar only shows if there are widgets assigned to it. If you have ads in a normal ad position but no other content then the sidebar doesn't show at all.

So you need to put the ad in an html widget and choose a sidebar display position for the widget

Then you give the widget a display condition to hide from usergroup

eg usergroup 123:
Code:
!$xf.visitor.isMemberOf(123)
This will then display/hide the sidebar as well

However if there is other sidebar widget content, you can make ads show or hide using the default ad positions by choosing usergroup from the dropdown, but the other widget will of course remain in the sidebar (unless you gave it some display condition)
 
Last edited:
Top Bottom