Home / Admin / RT7 Official – Maintenance Mode
Duplicate Snippet

Embed Snippet on Your Site

RT7 Official – Maintenance Mode

RT7 Official Maintenance Mode

<10
Code Preview
php
<?php
function custom_maintenance_mode() {
    if ( ! is_user_logged_in() ) {
        header( 'HTTP/1.1 503 Service Temporarily Unavailable' );
        header( 'Content-Type: text/html; charset=utf-8' );
        header( 'Retry-After: 3600' ); // You can change this value to set a different retry time (in seconds).
        ?>
        <!DOCTYPE html>
        <html>
        <head>
            <title>Under Maintenance</title>
            <style>
                body {
                    text-align: center;
                    padding: 100px;
                    font-family: "Helvetica Neue", sans-serif;
                    background-color: #f1f1f1;
                }
                h1 {
                    font-size: 50px;
                    margin-bottom: 30px;
                }
            </style>
        </head>
        <body>
            <h1>Pardon our digital dust, we're crafting something spectacular!</h1>
            <p>Please check back later.</p>
        </body>
        </html>
        <?php
        die();
    }
}
add_action( 'wp', 'custom_maintenance_mode' );

Comments

Add a Comment