You can use the Steady Switch to show or hide certain content for members on your website. For example, you can hide ads for members to give them a better website experience.

Show content to members only

To display certain content to members only, insert this code into the appropriate place on your website.

(Please note this code was changed in June 2022. If you are still using the notation type="steady-switch", you will need to update it to the code below):

<script type="text/plain" data-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, use this code:

<script type="text/plain" data-steady-switch data-when="no-subscription"><!-- INSERT CONTENT FOR NON-PAYING SUBSCRIBERS HERE --></script>

Please note

  • You must integrate the Steady Code into your website. 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 certain browsers, but they can still prevent the Steady Switch from working properly.

Possible incompatibilities

  • Changes you make may not be applied straight away. This might be 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, the 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.

  • The 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 Steady API.

Did this answer your question?