2020-07-14

WordPress Maintenance Mode

 14 Jul 2020  Snippets

WordPress Maintenance Mode

Add the following to current theme’s functions.php before the closing PHP tag:

/*
  Place the code below at the end of the theme's 'functions.php' file
*/

// Activate WordPress Maintenance Mode
function wp_maintenance_mode() {
if (!current_user_can('edit_themes') || !is_user_logged_in()) {
wp_die('<h1>Website Under Construction</h1><br/>Please check back later.');
}
}
add_action('get_header', 'wp_maintenance_mode');
Webmentions & Comments

Copyright © Paramdeo Singh. Made with ☕️ in Guyana. All Rights Reserved.

Last Site Build on Tue, 30 Nov 2021 19:17:38 -0500

1MB Club Badge

Paramdeo Singh Guyana

Riding the wave of consciousness in this treacherous mortal sea.

Technology Design Strategy Literature Personal Blogs