XF 2.1 Hiding Ads from members

Beermonster

Active member
Hi,

I've put some Google ad code in the page_container template but I only want it to show to people that aren't logged in, I've tried searching for the conditional bit of code to do it but can't find the bit I need.
 

<xf:if is="!$xf.visitor.user_id"> </xf:if>

Place your code between that to only show users not logged in. I also gave you a link conditional statements for Xenforo 2 which will show you other conditionals you can use. Also setup -> advertising is where you should be placing your ad code and not the PAGE_CONTAINER
 
Back
Top Bottom