Jump to content

Hide by Group ID


Music Case

Recommended Posts

Hello,

I'm wanting to hide an advertisement based on group ID's but i cant seem to get the below code to work, does anyone know how / if this can be done ? 

Thanks :) 

{{if $member ->member_group_id == 4}}
<div> // None Advertisement // </div>
{{else}}
<div> // Advertisement Code // </div>
{{endif}}

 

Link to comment
Share on other sites

Why not use the Advertisements feature under Site Promotions in IPS. It has a setting to hide those ads from selected groups and you don't have to edit any code.

Edited by Jeffrey
  • Support Team - September 9th, 2017 - June 8, 2018
  • Junior Moderator - December 14th 2018 - November 16th, 2019
  • Designer - November 16th, 2019 - June 5th, 2020
  • Moderator - June 5th, 2020 - August 28th, 2020
Link to comment
Share on other sites

16 hours ago, Jeffrey said:

Why not use the Advertisements feature under Site Promotions in IPS. It has a setting to hide those ads from selected groups and you don't have to edit any code.

I was originally but I wanted advertisements in specific locations so I had to hardcode them in.

However I found the solution! So no worries :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...