large shade tree

Navigation

Information

Recent Posts

Shade Tree Sites |Building Better Websites

Easy Maintenance Mode for WordPress

Paste the following code into your functions.php file and remove once done:

function wpr_maintenance_mode() {
    if ( !current_user_can( ‘edit_themes’ ) || !is_user_logged_in() ) {
        wp_die(‘Maintenance, please come back soon.’);
    }
}
add_action(‘get_header’, ‘wpr_maintenance_mode’);

 

* courtesy wprecipes