| 开发者 | gt3dmakers |
|---|---|
| 更新时间 | 2026年10月10日 00:09 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[gt3d_restrict] shortcode. Choose who sees the content: only some roles, or everyone except some roles.
Already have the content in your page? Select the blocks, then choose Transform to > Restricted content, like you would with a Group. “Ungroup” removes the restriction and keeps the blocks.
Elementor
A “Role access” panel in the Advanced tab of every section, column, container and widget. Choose who sees the element: only some roles, or everyone except some roles. Restricted elements are removed on the server, never stored in Elementor's element cache, and the editor and preview always show them so you can keep working on them.
Built for real sites
No. WooCommerce is only needed to add links to its My Account menu.
A notice in the dashboard and in the pages list offers to create it again. Until then, visitors are sent to the login page and logged-in users to the home page.
Administrators always see reserved pages. Open the page in a private browser window, or log in with an account that has the role you want to test.
Pages and posts. Developers can add other post types with the gt3d_ra_protectable_post_types filter.
In the WordPress edit screen sidebar, not inside the Elementor editor: open the page normally (Pages, not the “Edit with Elementor” button) to find it. Inside the Elementor editor itself, select a section, column, container or widget to find its own “Role access” panel in the Advanced tab — that one restricts just that element, not the whole page. It does not support Elementor's newer atomic elements yet (Elementor 4).
[gt3d_restrict roles="wholesale,shop_manager"]Content for these roles[/gt3d_restrict]
roles: comma-separated role slugs. Also accepts logged_in (any logged-in user) and guest (visitors who are not logged in).mode: show (default, only these roles) or hide (everyone except these roles).message: text shown to everyone else.login_link: yes to add a login link for visitors.administrator, editor, author, contributor and subscriber; WooCommerce adds customer and shop_manager.
Menus depend on the logged-in user. Make sure your page cache does not serve cached pages to logged-in users (this is the default for most caching plugins and hosts).
Access rules and the “Access denied” page are kept, so you can reinstall the plugin or switch between the free and Pro versions without losing anything. Pages are no longer protected while the plugin is not active.
To remove everything, add define( 'GT3D_RA_REMOVE_ALL_DATA', true ); to wp-config.php before deleting the plugin.