/ Published in: PHP
                    
                                        
Just paste the following snippet into your functions.php file and save it.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function cwc_maintenance_mode() {
if ( !current_user_can( 'edit_themes' ) || !is_user_logged_in() ) {
wp_die('Maintenance, please come back soon.');
}
}
add_action('get_header', 'cwc_maintenance_mode');
Comments
 Subscribe to comments
                    Subscribe to comments
                
                