How to put website under coming soon/maintenance mode with Bricks?

Nice, works great! Do you know if there is a way to hide the slug of the coming soon page? So you get mydomain.com/ instead of mydomain.com/coming-soon?

Just put it (temporarily) as your “Homepage”, thats how i did it. :slight_smile:

I found this way works well:

  • Create a maintenance/coming soon page in Bricks
  • add the following to your functions.php file or use something like code snippets:

add_action( ‘template_redirect’, ‘comingsoon’ );
function comingsoon() {
if( !is_user_logged_in() && !is_page(‘coming-soon’) ){
wp_redirect( site_url(‘coming-soon’) );
exit();
}
}

  • This sets up all pages to redirect to that page, but then…
  • change the home page in your reading settings to this new page
  • now instead of your coming soon etc page being in the url, it only shows the site url with no page url and all pages will redirect to the home page!

Then when you want to change it back, simply comment out that function/deactivate in code snippets and change back to the homepage url

Hope that helps.

2 Likes

This doesn’t work for me. Does it need to be updated?

So this works out of the box? Any tweaks I should make? And I give the page Coming Soon as a title? that’s it?

I hope it will add bricks coming soon/maintenance mode. Strangely, some users are against adding this feature and prefer to use third-party plugins!
If bricks adds this feature, it will definitely be the most suitable option.

would be greate to see this feature as in other page builder.

I agree this feature should be available natively. Although I rarely use it.

1 Like