Shed Menu adds visibility conditions to WordPress navigation menu items. You can show or hide each item based on three conditions:
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.
shedmenu_visible() in your header.php or other template files.<?php if ( shedmenu_visible( [ 'login' => 'in' ] ) ) : ?>
<li><a href="/mypage/">My Page</a></li>
<?php endif; ?>
[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」ブロックで任意のブロック群を条件表示にできます。
This plugin does not connect to any external services. All processing happens on your own server.