[WordPress] 外掛分享: Hide Menu Items by Role

首頁 › 外掛目錄 › Hide Menu Items by Role
WordPress 外掛 Hide Menu Items by Role 的封面圖片
100+
安裝啟用
★★★★★
5/5 分(1 則評價)
36 天前
最後更新
—
問題解決
WordPress 5.0+ PHP 7.0+ v2.1.0 上架:2023-03-16

內容簡介

此插件可根據使用者角色隱藏菜單項目,當您建立或編輯菜單項目時,可選擇哪些使用者角色無法看到該項目。
此插件使用 WP 核心的濾波器隱藏菜單項目,表示不使用任何JavaScript或JQuery。

HTML項目清單:

此插件可根據使用者角色隱藏菜單項目,當您建立或編輯菜單項目時,可選擇哪些使用者角色無法看到該項目。
此插件使用 WP 核心的濾波器隱藏菜單項目,表示不使用任何JavaScript或JQuery。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Hide Menu Items by Role」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Hide Menu Items by Role lets you decide who sees each link in your WordPress navigation, item by item, without building a separate menu for every audience. Open Appearance > Menus, edit a menu item, and choose which user roles should see it and whether it belongs to logged-in users, logged-out visitors, or everyone.
It is a small, focused tool for client sites, membership and community sites, WooCommerce stores, and any site where guests and registered users need different navigation.
What you can do

Show a menu item to everyone, ignoring role rules (“Show to all roles”, the default)
Hide a menu item from the user roles you select
Show a menu item only to the user roles you select
Restrict items by user status: everyone, logged-in users only, or logged-out visitors only
Combine role and user-status rules on the same item
Tick as many roles as you need, including custom roles registered by other plugins

Why it stays out of the way

No settings page to learn, because the options live in the menu item editor right where you need them
No extra database tables, as every setting is stored as standard menu item meta
Filtering runs through WordPress core menu filters, so no frontend JavaScript or CSS is added to your site
Role checkboxes are disabled whenever a rule does not apply, which makes the panel hard to misconfigure by accident

延伸相關外掛

文章
Filter
Mastodon