| 开发者 | apos37 |
|---|---|
| 更新时间 | 2026年6月11日 05:23 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
maintenance-mode class to the body element for further customization./wp-content/plugins/simple-maintenance-redirect/ directory.Yes! Just create a page like you would normally and the plugin will automatically hide the header and footer so that your navigation bar and page styling is not visible. If you want to further customize the appearance of the page such as the background color, you can use CSS like you would any other page. A maintenance-mode class has been added to the body element for easier targeting. CSS can easily be added in your customizer.
Yes! Logged-in administrators are always allowed. You can also customize bypass conditions using the smredirect_redirect_rules filter.
`<?php
add_filter( 'smredirect_redirect_rules', function( $checks, $page_id, $request_uri ) {
// Allow access to a specific user (with ID 37)
$checks[ 'not_john_smith' ] = get_current_user_id() !== 37;
// Allow access to a specific role
$user = wp_get_current_user();
$checks[ 'not_editor' ] = !in_array( 'editor', (array) $user->roles, true );
// Always return checks
return $checks;
}, 10, 3 );
?>`
We recommend using our website support forum as the primary method for requesting features and getting help. You can also reach out via our Discord support server or the WordPress.org support forum, but please note that WordPress.org doesn’t always notify us of new posts, so it’s not ideal for time-sensitive issues.
If a redirect was issued previously as a permanent redirect (HTTP 301) it can be cached by browsers and upstream caches (CDNs, reverse proxies). A cached 301 tells clients "this URL has moved permanently" and many browsers and proxies will continue using the cached result without checking the origin again. What we do now: