Jump to content

Recommended Posts

Posted

Hi,

I have some advertising code which needs to go in the footer section of my theme.

Is there some conditional code which I can surround it with so it only shows to guests. 

One of the advantages I offer my registered users is less adverts so I only want this advert to show to guests. 

I was hope there was some code that would be along the lines

conditional show if user=guest

Advertising code/script

end conditional

Thanks a lot,

Rob

Posted

{{if \IPS\Member::loggedIn()->member_id === NULL}}

This content *only* shows to guests, since they have a NULL member_id.

{{endif}}

 

{{if \IPS\Member::loggedIn()->member_id}}

This content *only* shows to logged-in users since their member_id is a number, which will equal true.

{{endif}}

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...