How to bypass Elementor's maintenance mode using the query string

I recently found myself in a situation where I needed to test the non-logged in user experience while Elementor's maintenance mode was enabled.

The quick and easy solution I came up with was to override the option Elementor uses to enable maintenance mode when the query string contained a parameter of my choosing.

Using the snippet below, I'm able to bypass the maintenance mode by appending ?bypass_maintenance=1 to the query string.

e.g; https://somesite.com/some/page/?bypass_maintenance=1

One last thing…

If you liked this article, I'd be incredibly grateful if you tweeted about it.

Also, I don't send emails often but when I do, I try to fill them full of useful goodies. If you like code snippets & dev tips, join my mailing list. There's no catch but I'll probably want to tell you about any new plugins & tools I build.