[WordPress] 外掛分享: Shed Menu

首頁外掛目錄 › Shed Menu
WordPress 外掛 Shed Menu 的封面圖片
全新外掛
安裝啟用
尚無評分
8 天前
最後更新
問題解決
WordPress 6.0+ PHP 8.1+ v0.1.6 上架:2026-05-13

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.6) 或搜尋安裝

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

原文外掛簡介

Shed Menu adds visibility conditions to WordPress navigation menu items. You can show or hide each item based on three conditions:

Login status (logged in / logged out / everyone)
Date range (start datetime, end datetime)
User roles (administrator, editor, author, contributor, subscriber, or custom roles)

All conditions are optional and combined with AND logic. This plugin reads the current user’s role information via wp_get_current_user() to evaluate role-based conditions.
Three ways to use

Standard menus — Open Appearance → Menus, expand any item, and set the conditions inline.
Hand-coded themes — Use the helper function shedmenu_visible() in your header.php or other template files.
Block editor — Wrap any blocks in the “Shed Menu — Conditional” block to show/hide them based on the same conditions.

Helper function example
'in' ] ) ) : ?>

  • My Page
  • Shortcode example
    [shedmenu_visible login="in" start="2026-04-01" end="2026-04-30" roles="administrator"]
    This content is only visible to administrators between April 1 and April 30.
    [/shedmenu_visible]

    日本語の説明
    WordPress 標準ナビゲーションメニューに、メニュー項目単位の表示条件を追加します。

    ログイン状態(ログイン中 / ログアウト中 / 全員)
    表示期間(開始日時・終了日時)
    ユーザーロール(管理者 / 編集者 / 投稿者 等)

    全ての条件は任意で、AND 条件で組み合わされます。
    外観 → メニュー画面で各項目に条件を設定できます。テーマで wp_nav_menu() を使わず HTML 直書きしている場合は shedmenu_visible() ヘルパー関数を使ってください。Gutenberg では「Shed Menu — Conditional」ブロックで任意のブロック群を条件表示にできます。
    Third-Party Services
    This plugin does not connect to any external services. All processing happens on your own server.

    延伸相關外掛

    文章
    Filter
    Apply Filters
    Mastodon