Linux 软件免费装
Banner图

GT3D - Role-Based Content

开发者 gt3dmakers
更新时间 2026年10月10日 00:09
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce elementor restrict content user roles page protection

下载

1.0.1 1.2.0

详情介绍:

Wholesale buyers, public sector customers, resellers, members, staff… Some users need pages that others should not see. GT3D - Role-Based Content does it without any settings screen: everything happens in the page editor. Reserve a page in two clicks Open a page, find the “Role access” panel in the sidebar and tick the roles allowed to see it. That’s it. Tick nothing and the page stays public. Menus update themselves Links to a reserved page disappear for everyone who cannot open it, in: WooCommerce My Account menu With WooCommerce, one more switch in the panel adds the page to the My Account menu, only for the roles that can open it. Choose where it goes: first, after any existing item, or just before “Log out”. Restricted content inside a page To hide only part of a page, use the “Restricted content” block or the [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

安装:

  1. Upload the plugin through Plugins > Add New > Upload, or install it from the plugin directory.
  2. Activate it. An “Access denied” page is created.
  3. Edit a page and open the “Role access” panel in the sidebar.

屏幕截图:

  • The “Access denied” page seen by a visitor.
  • The “Reserved” view of the pages list.
  • The “Restricted content” block in the editor.

常见问题:

Do I need WooCommerce?

No. WooCommerce is only needed to add links to its My Account menu.

I deleted the “Access denied” page

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.

How do I test what a customer sees?

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.

Which content types can be reserved?

Pages and posts. Developers can add other post types with the gt3d_ra_protectable_post_types filter.

I use Elementor: where is the “Role access” panel for the whole page?

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).

How do I use the shortcode?

[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.
The slug of a role is shown by most role editor plugins. Default WordPress roles are administrator, editor, author, contributor and subscriber; WooCommerce adds customer and shop_manager.

A menu shows the wrong links

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).

What happens when I delete the plugin?

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.

更新日志:

1.2.0 1.1.0 1.0.1 1.0.0