Streaming live at 10am (PST)

Hide elements when url contains a certain parameter

Hey guys,

here’s a page example where I want to hide 2 elements in the footer - “Ramin Khaze The Difference.” and “Schedule showing”, when url contains a certain parameter, for example “?mls”

I’ve found a similar topic here but I must be doing something wrong (I’m a beginner in coding) because nothing’s working for me.

Does anybody know a way to do it in Webflow? I will apreciate any help and a piece of advice! Thanks in advance!

Here is my site Read-Only:

I think the script in your collections page is using jQuery. If you haven’t already, you’ll need to add jQuery to your page. (Maybe you’ve added it already, but I didn’t see it.) This page has some options:

If that doesn’t work, an alternative might be to do this without jQuery. Something like:

    // find the element
    let goBackButton = document.getElementById("goBackButton");

    // add the click event
    goBackButton.addEventListener("click", function() {

(For this to work, you’ll need to give your go back button an ID. Click the div block, go into its settings, and add an ID of goBackButton.)

Thank you for the responce! But it doesn’t solve what I’m trying to achieve…

Sorry, I forgot you were trying to hide the elements based on the URL parameters. Here is a more complete answer.

  1. Determine if the URL contains the parameter
    This site has a pretty good explanation of how to get the value of a parameter, or check if it exists.

You can also refer to this Webflow forum post.

  1. Hide the elements
    If you give the element an ID of “raminkhaze” using the Webflow interface, you could do the following:
var x = document.getElementById("raminkhaze"); = "none";

Putting these together, I imagine something like this would work:

const queryString =;

const urlParams = new URLSearchParams(queryString);
if (urlParams.has('mls')) {
  var x = document.getElementById("raminkhaze"); = "none";  

Thank you so much for helping me and spending your time, it worked perfect!!! :heart_eyes: I’m sending lots of bonuses to your Karma :relaxed:

Great. I’m glad this worked!

And thanks for that, I’ll take all the karma I can get :smiley:


do you know how that would work if you don’t want to target a url parameter but a subdomain?

I want to hide/show elements based on the url subdomain language (

Thanks in advance!