hide-for-mls
) to the footer elements you want hidden.?mls
in the URL and hides elements with that class.• Problem: You want to hide footer elements (like “Ramin Khaze The Difference” and “Schedule showing”) when the URL contains a specific parameter (e.g., “?mls”).
• Solution: Use custom JavaScript added in Webflow’s custom code area that checks the URL for the parameter and then hides the targeted elements—after assigning them unique classes (or IDs) in the Designer.
• Add Custom Classes:
• Locate Custom Code Section:
In your Webflow Dashboard, go to the page’s Settings or Project Settings.
Navigate to the “Custom Code” section and find the area labeled “Before
tag.”
• Insert the JavaScript:
Add the following inline JavaScript code (ensure you wrap the code within standard
• Tip: Ensure there are no syntax errors and that your class names in the code match those you set in the Designer.
• Publish Your Site: After saving the changes, publish your site.
• Test the Functionality:
Assign a unique class to your footer elements in Webflow, then add a custom JavaScript snippet in your site’s custom code area to check for the “?mls” parameter and hide those elements accordingly. This process ensures a targeted change based on the URL.