Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically show/hide Elementor content based on URL parameters?

Elementor's docs mention Dynamic Request Parameters, but I don't think they can be used to control visibility.

I'm open to plugins, including paid solutions.

I know this can be done via JavaScript, by checking query parameters and then setting class names, but this quickly gets out of control (it's what we do currently.)

like image 294
Slbox Avatar asked Oct 31 '25 11:10

Slbox


1 Answers

Very late to this party but I was searching for the same thing then realised it was actually very easy with Elementor itself.

Set an element's CSS class dynamically, as a Get request parameter giving it the name you require - in the screenshot below I've just used "visibility". I've also set fallback (Advanced > Fallback) to "hide" and created a couple of CSS classes.

Now the element is visible with the URL parameter ?visibility=show otherwise it is hidden.

Not sure if this helps at all but it does the trick for me.

.hide
{
    visibility: hidden;
}

.show
{
    visibility: visible;
}

enter image description here

like image 137
joelinit Avatar answered Nov 02 '25 00:11

joelinit