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 integrate the Steady Code into your website. Please note: It is not enough to include the Steady Code only on the page on which you're using it – you must also include it on your homepage, at the very least.
- The Steady Code is only used once per page.
- The Steady Switch only works if you have integrated a paywall or the Steady Login on your website. This is the only way for the site to recognise that it is being accessed by a member.
- Make sure that your source code is clean. For example, closing tags (such as </p>) must not be missing. Inaccuracies like these might be ignored by browsers, but they can prevent the Steady Switch from working properly.
- 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.