| 开发者 | apos37 |
|---|---|
| 更新时间 | 2026年11月6日 02:33 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
deadbolt folder to /wp-content/plugins/.[deadbolt] shortcode - creating this page from Settings automatically adds the shortcode.Visitors are only redirected once a published No Access Page is selected under Deadbolt > Settings. Also check that the post type is enabled under Post Types.
When a visitor is redirected, the No Access Page looks at the restricted post, the link the visitor arrived with, and the reason they were blocked: they need to log in, they lack the required role or user access, they are logged in on a logged-out-only page, or their link does not match the page's URL Parameter rule. A template for that specific post wins over one for its post type, which wins over a global one. If nothing matches, a built-in default is used.
Choose URL Parameter as the access for a post, or as a post type's default, then enter a parameter name, a condition and a value. Visitors whose link matches can view the content, logged in or not, and everyone else is sent to the No Access Page and shown your "URL Parameter Not Met" templates. For example, "id is not" with no value requires links like ?id=123, while "ref is email" only opens the page from your email links. When hiding restricted content from archives, search, feeds, sitemaps and menus, links are checked without parameters, so the content is listed only if its rule matches an empty parameter. WordPress query names, such as p, s and page_id, can't be used.
Yes. In the Access box on that page, click "Create a unique template for this post". Alternatively, create a new template and choose "Specific Posts" as the Scope and choose the page you want. Then select "Follows each post's Access setting." You will still need to select the Access point on the page itself if you don't want it set to the default.
{login_link}, {login_url}, {logout_link}, {logout_url}, {register_link}, {register_url}, {retry_link}, {retry_url}, {home_link}, {home_url}, {post_title}, {post_url}, {required_roles}, {user_display_name} and {site_name}. The Merge Tags box on the template screen lists them all, and developers can add more with the deadbolt_merge_tags filter.
Restricted content is always protected when visited directly. The optional hiding features depend on how your theme and other plugins load content:
suppress_filters turned on, is not affected.'deadbolt_context' => 'archives' to the query arguments to include them.Yes. Access rules are kept in a single cached index, so no post meta joins are added to your queries. For the best performance, restrict whole post types with the default access and allow exceptions per post, rather than restricting thousands of posts one by one.
Restricted pages redirect before any content is sent, and the No Access Page tells caching plugins not to cache it. If a page cache serves logged-out visitors, clear it after changing access rules.
Nothing is removed unless you check "Remove All Plugin Data on Uninstall" under Settings > Advanced.
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.