Disable ads if the user has an active subscription

Hi, I have recently started my blog with ghost and I have implemented adsense ads. I would like to know if there is a way to make the ads on my page disappear if the user is logged in and has an active subscription.

Thank you very much in advance.

In your theme, this snippet will only output if the current visitor is not a logged-in member

{{^if @member}}
  // ad code

Sorry, I missed that you said “has an active subscription” - the snippet above is for any logged-in member, for paid members only, use:

{{^if @member.paid}}
  // ad code

The problem is that I’m using the insert script feature so I don’t know how to put the script.

Do you mean code injection inside ghost admin? Yeah, it wouldn’t work there - you’d need to edit your theme to do this

What file I need to edit.