data-hide-on-param="mls"
custom attribute to the footer elements you want to hide in Webflow.?mls
URL parameter and hides those elements on page load.To hide specific footer elements in Webflow based on a URL parameter (like ?mls
), you can use a small amount of custom code with native Webflow features.
data-hide-on-param
mls
(or any identifier you prefer)This marks the elements as conditionally hidden.
Go to Page Settings (or Project Settings > Custom Code if you want this behavior site-wide).
Scroll to Before
tag and paste the following:
(Note: This script is beginner-friendly and automatically checks the URL for the mls
parameter.)
```javascript
```
Click Save and Publish your site to test the changes live.
?mls
parameter in the URL. Example:https://your-site.webflow.io/?mls
data-hide-on-param="mls"
will now be hidden on load.?mls
, the elements will be visible.To hide footer elements based on a URL parameter, add a custom data-hide-on-param
attribute in Webflow, and use a small script that listens for ?mls
in the URL. This approach is low-code and works well for beginners.