Title: Shed Menu
Author: teamstaccato
Published: <strong>May 14, 2026</strong>
Last modified: September 25, 2026

---

Search plugins

![](https://ps.w.org/shed-menu/assets/banner-772x250.png?rev=3532541)

![](https://ps.w.org/shed-menu/assets/icon-256x256.png?rev=3532541)

# Shed Menu

 By [teamstaccato](https://profiles.wordpress.org/teamstaccato/)

[Download](https://downloads.wordpress.org/plugin/shed-menu.0.1.7.zip)

 * [Details](https://mri.wordpress.org/plugins/shed-menu/#description)
 * [Reviews](https://mri.wordpress.org/plugins/shed-menu/#reviews)
 *  [Installation](https://mri.wordpress.org/plugins/shed-menu/#installation)
 * [Development](https://mri.wordpress.org/plugins/shed-menu/#developers)

 [Support](https://wordpress.org/support/plugin/shed-menu/)

## Description

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.

#### Important: this is display control, not access control

Shed Menu hides menu items, blocks, and shortcode content from output. It does **
not** restrict access to the underlying page, post, or URL. A visitor who knows 
or guesses the direct URL can still open it even if the menu link to it is hidden.
Do not rely on Shed Menu to protect private or paid content — use post visibility
settings (Private / Password protected) or a membership plugin for that.

#### Three ways to use

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

#### Helper function example

    ```
    <?php if ( shedmenu_visible( [ 'login' => 'in' ] ) ) : ?>
        <li><a href="/mypage/">My Page</a></li>
    <?php endif; ?>
    ```

#### 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」ブロックで任意のブロック群を条件表示にできます。

**重要: これは「表示の制御」であり「アクセス制限」ではありません。** Shed Menu は
メニュー項目・ブロック・ショートコードの内容を出力しないようにするだけで、リンク
先のページや投稿・URL 自体へのアクセスを制限するものではありません。メニューを非
表示にしても、URL を直接知っている（または推測できる）訪問者はそのページを開けます。
非公開にしたい・有料会員限定にしたいコンテンツの保護には、投稿の公開状態（非公開・
パスワード保護）や会員制プラグインを使ってください。

### Third-Party Services

This plugin does not connect to any external services. All processing happens on
your own server.

## Screenshots

[⌊Visibility fields added to each menu item in Appearance → Menus.⌉⌊Visibility fields
added to each menu item in Appearance → Menus.⌉[

Visibility fields added to each menu item in Appearance  Menus.

[⌊The Conditional block in the Gutenberg editor with sidebar settings.⌉⌊The Conditional
block in the Gutenberg editor with sidebar settings.⌉[

The Conditional block in the Gutenberg editor with sidebar settings.

[⌊Plugin settings screen (Settings → Shed Menu).⌉⌊Plugin settings screen (Settings
→ Shed Menu).⌉[

Plugin settings screen (Settings  Shed Menu).

## Installation

 1. Upload the `shed-menu` folder to the `/wp-content/plugins/` directory, or install
    via the Plugins screen in WordPress.
 2. Activate the plugin through the Plugins screen.
 3. Go to Appearance  Menus, expand any menu item, and configure visibility conditions.

## FAQ

### Does this work with caching plugins?

Login-based visibility is evaluated per request. If you use a page caching plugin,
make sure it serves separate cached pages for logged-in vs logged-out users. Most
caching plugins support this by default.

### Does this conflict with other menu plugins?

Shed Menu uses the standard `wp_nav_menu_objects` filter and does not override menu
rendering. It works alongside most menu plugins.

### Why doesn’t the date condition work in the Navigation block (block theme)?

The Navigation block uses its own internal item structure that does not expose per-
item post meta in a stable way. Use the “Shed Menu — Conditional” block to wrap 
navigation links instead.

### What happens to my settings when I uninstall?

Uninstalling removes all visibility settings stored on menu items and plugin options.
Deactivating without uninstalling preserves all settings.

### Can I use custom roles?

Yes. The Roles field in the menu item editor lists all roles registered in your 
WordPress installation, including custom roles added by other plugins.

### Does hiding a menu item also protect the page it links to?

No. Shed Menu only controls whether a menu item, block, or shortcode content is 
rendered in the output. It does not restrict access to the linked page, post, or
URL itself — a visitor who has the direct link can still open it. To actually restrict
access to content, use WordPress’s built-in post visibility settings (Private / 
Password protected) or a membership plugin.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Shed Menu” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ teamstaccato ](https://profiles.wordpress.org/teamstaccato/)

[Translate “Shed Menu” into your language.](https://translate.wordpress.org/projects/wp-plugins/shed-menu)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/shed-menu/), check 
out the [SVN repository](https://plugins.svn.wordpress.org/shed-menu/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/shed-menu/) by [RSS](https://plugins.trac.wordpress.org/log/shed-menu/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.1.7

 * [doc] Clarified in the description, FAQ, and manual that Shed Menu controls display
   only, not access — hiding a menu item does not restrict access to the linked 
   page or URL.
 * Confirmed compatibility with WordPress 7.1 (including the block editor changes
   shipped in 7.1.1).

#### 0.1.6

 * Confirmed compatibility with WordPress 7.0

#### 0.1.5

 * [fix] Block namespace renamed from `shed/conditional` to `shed-menu/conditional`
   for WordPress.org compliance.
 * [fix] Helper function renamed from `shed_menu_visible()` to `shedmenu_visible()`
   for prefix consistency.
 * [fix] Shortcode renamed from `[shed_menu_visible]` to `[shedmenu_visible]` for
   prefix consistency.
 * [fix] readme.txt License field updated to SPDX identifier GPL-2.0-or-later.

#### 0.1.4

 * [perf] Child-item cascade removal now uses O(1) hash lookup instead of O(n) in_array;
   added circular-reference guard.
 * [fix] Added update_meta_cache() call in filter_menu_items() to prevent N+1 meta
   queries on large menus.
 * [fix] normalize_datetime() now validates month/day with checkdate() to reject
   invalid dates like 2026-02-30.
 * [fix] array_filter() applied to roles meta in is_item_visible() to strip empty
   strings stored in serialized arrays.
 * [fix] Added Domain Path header; renamed wp_localize_script object from wsmData
   to shedmenuData.
 * [fix] Removed non-standard Description-ja header field.

#### 0.1.2

 * [fix] Constant `Shedmenu_PATH` renamed to `SHEDMENU_PATH` to follow WordPress
   naming conventions (uppercase).
 * [fix] Replaced `phpcs:disable/enable` blocks with per-line `phpcs:ignore` in 
   menu item save handler. Added English comment explaining core nonce pre-verification.

#### 0.1.1

 * Changed: All function, class, constant, hook, and option prefixes renamed from
   wsm_/WSM_ to shedmenu_/SHEDMENU_/Shedmenu_.

#### 0.1.0

 * Initial release.
 * Login status visibility (in / out / either).
 * Scheduled date range visibility (start / end datetime).
 * Role-based visibility (all registered roles supported).
 * Helper function shed_menu_visible() for hand-coded themes.
 * Shortcode [shed_menu_visible] for widgets, pages, and classic editor.
 * Conditional block (shed/conditional) for the block editor.
 * Automatic cascade: hiding a parent item also hides all its children.

## Meta

 *  Version **0.1.7**
 *  Last updated **4 days ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 8.1 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/shed-menu/)
 * Tags
 * [conditional](https://mri.wordpress.org/plugins/tags/conditional/)[menu](https://mri.wordpress.org/plugins/tags/menu/)
   [navigation](https://mri.wordpress.org/plugins/tags/navigation/)[role](https://mri.wordpress.org/plugins/tags/role/)
   [visibility](https://mri.wordpress.org/plugins/tags/visibility/)
 *  [Advanced View](https://mri.wordpress.org/plugins/shed-menu/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/shed-menu/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/shed-menu/reviews/)

## Contributors

 *   [ teamstaccato ](https://profiles.wordpress.org/teamstaccato/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/shed-menu/)