Webflow sync, pageviews & more.
NEW
Answers

In Webflow, how can I hide specific elements in the footer (such as "Ramin Khaze The Difference" and "Schedule showing") when the URL contains a certain parameter, such as "?mls"? I am a beginner in coding and would appreciate any help. Thank you!

To hide specific elements in the footer of your Webflow site based on the URL parameter, you'll need to use custom code. Here's a step-by-step guide to achieve this:

1. Identify the specific elements in your footer that you want to hide. In your case, it's "Ramin Khaze The Difference" and "Schedule showing".

2. Open the Webflow Designer and select the footer section where these elements are located.

3. Give the footer section a unique class name. To do this, click on the footer section, go to the right-hand sidebar, and look for the "Class" field. Enter a class name like "hide-on-mls" (without quotes) and press Enter.

4. Once you have assigned the class to the footer section, switch to the "Custom Code" tab in the Webflow Designer.

5. In the "Head" section of the Custom Code tab, add the following code:

```html

```

6. This JavaScript code uses the `URLSearchParams` API to check if the URL parameter `mls` exists. If it does, it selects the footer section with the class "hide-on-mls" and sets its display property to "none", effectively hiding the elements.

7. Save your changes in Webflow and publish your site.

With this code in place, when the URL contains the parameter "?mls", the specified elements within the footer will be hidden. This can be useful if you want to show different content in the footer based on specific URLs or parameters.

Note: If you're pasting the code inside an embedded HTML widget in Webflow, make sure you remove the `