How to exclude the script on a page
You can exclude the entire Stay22 script from specific pages on your website
A full script exclusion stops the Stay22 script from running on the selected page or pages. This also prevents script-based products such as Lift (formerly known as Linkswap), Spark and Nova from running there.
How to exclude the script in WordPress
The steps below use the WPCode plugin, as this is the way we advise partners to install it. Menu names may vary slightly depending on your WPCode version.
Before you start, copy the Stay22 script from the Partner Hub.
- In WordPress, go to
Code Snippetsand chooseAdd SnippetorHeader & Footer. - Select
Add Custom Codeand chooseHTML. - Paste your Stay22 script into the snippet.
- Set the insertion method to
Auto Insert→Site Wide Header. - Activate
Smart Conditional Logic. - Add a rule to
Hide this code snippet if→Page URL is, then enter the complete URL of the page you want to exclude. - For multiple pages, add a separate condition group for each excluded URL.
- Save and activate the snippet.
- Remove the original Stay22 script from your site’s global Header/Footer area so the script is not installed twice.
- Clear your website cache.
Check that the script exclusion is working
Test both types of page:
- Open an excluded page and confirm that the Stay22 script is not loading.
- Open a page that should remain enabled and confirm that the script is still loading there.
You can follow these steps to verify your script is loading. If you're getting an unexpected result, email support@stay22.com.