Maintenance Mode In WordPress

Wordpress PHP net

I was called upon by a client to make revisions to a webpage. They have been updating the content, but this was beyond their skills. Also the rest of the website was to remain operational while the revisions were being made. We need to make a ‘splash page’ to let visitors know a particular page is undergoing maintenance. To do this, I needed to use the conditional tag ‘is_page()’ with the parameter ‘post_name’ in a multiple conditional if statement to specify the page, and also check if the user is authorized to edit the theme and is also logged in. If they are logged in, the page will display to them only.

You can put any message you want to display. You can use a plugin, but something this simple can just as easily be put in the functions.php file.

If you want the whole site to be in maintenance mode just remove the is_page() conditional tag.

If you are not using the Genesis Theme framework, you can use either if these action hooks.