You can use the Steady Switch to show or hide certain content for your members on your website. For example, you can hide ads for members.
Show content to members only
Insert this code into the appropriate place on your website:
<script type="steady-switch" data-when="subscription"><!-- INSERT CONTENT ONLY FOR PAYING SUBSCRIBERS HERE --></script>
Do not show content to members
When you want to display certain content, such as advertisements, to users who are not members:
<script type="steady-switch" data-when="no-subscription"><!-- INSERT CONTENT FOR NON-PAYING SUBSCRIBERS HERE --></script>
- You must insert the Steady code on the page where you are using the Steady Switch.
- Please note that the Steady Switch only works if you have integrated a paywall or Steady login on your website. This is the only way for the site to recognize that it is being accessed by a member.
- Changes you make may not be applied straight away, due to caching or if you are using the CloudFlare tool.
- If you are using WordPress, cache or optimization plugins might remove HTML comments from your source code. In this case, Steady Switch code would also be deleted. If you are using these plugins, keep an eye out for these kinds of changes.
Important for installation
Be careful when installing the Steady Switch. It’s quite easy to make a mistake, like accidentally removing the tags. Here are some important tips:
- Please do not remove the opening and closing tags (i.e. <!- - and - ->) when you insert your content.
- Your content itself must not contain any comments (i.e. <!- - or - ->).
- Note that after <!-- and before --> there must be a line break for the integration to work.
If you want to make your website ad-free for members and have the capacity to do so, you can also use the API.