Skip to content
Article WordPress Visibility Rules
☀️ Light Clean and bright
📜 Sepia Warm and vintage
🌤️ Light Gray Subtle and neutral
🔵 Light Blue Calm and serene
🌙 Dark Easy on the eyes
🌑 Dark Gray Deep and modern
🔷 Dark Blue Professional and sleek
🌿 Forest Calm and natural

WordPress Visibility Rules

Sepodesk lets you decide who sees each menu item and each block on your WordPress site — the same way you control the docs navigation with showWhenLoggedin and roles_to_view.

The difference: docs navigation checks the Sepodesk user. WordPress menus and blocks check the WordPress user (whoever is signed in to wp-login.php).

This guide covers:

  1. The rules — Show to, Roles, Membership tier, Locked
  2. Menus — classic menus and the Navigation block
  3. Smart links — log in, log out, register, account, join
  4. Blocks — any block on any page, including widgets
  5. CSS classes — the shortcut that works everywhere
  6. Recipes
  7. Troubleshooting

The rules

Every rule is built from up to four settings.

Show to

OptionWho sees it
EveryoneAll visitors, signed in or not. This is the default.
Logged-in users onlyOnly visitors who are signed in.
Guests onlyOnly visitors who are not signed in. It disappears the moment someone logs in — admins included.

Roles

Tick one or more WordPress roles (Administrator, Editor, Subscriber, …). The visitor must hold at least one of them.

  • No roles ticked = any role.
  • Ticking a role implies the visitor must be signed in.

Membership tier

Pick a Sepodesk membership tier. The visitor must hold that tier or a higher one — something set to Gold also shows to Premium members.

  • — None — = no tier required.
  • Choosing a tier implies the visitor must be signed in.

Show locked instead of hiding

Only appears once a tier is chosen. When a visitor doesn't have the tier, instead of seeing nothing they see a locked version:

VisitorLocked menu linkLocked block
Guest🔒 label, links to log in and then back to the link's page"🔒 Gold members only" card with a Log in to continue button
Signed in, without the tier🔒 label, links to the membership join pageSame card with a Become a Gold member button

Use it to advertise members-only content instead of hiding it. Locking only applies to the tier: a visitor who fails a role or Show to check still sees nothing.

How the rules combine

  • Nothing set → visible to everyone.
  • Several settings → all must pass.
  • Guests only ignores roles and tiers — a guest has neither.
  • Administrators pass every role and tier check, so you always see members-only items while editing. They still don't see Guests only items.
  • Hiding or locking a menu item hides its whole submenu. Children are never promoted to the top level, and a locked parent's children stay hidden — they're the content being offered.

Classic menus (Appearance → Menus)

  1. Go to Appearance → Menus and choose your menu.
  2. Expand the menu item.
  3. Find the Sepodesk visibility box.
  4. Set Show to, tick any roles, pick a membership tier, and tick Show locked instead of hiding if you want the locked version.
  5. Click Save Menu.

The Customizer's menu screen (Appearance → Customize → Menus) doesn't show the box. Saving a menu there leaves existing rules untouched.

Block themes (Navigation block)

Select a Navigation link in the Site Editor and use the Sepodesk visibility panel in the block sidebar — see Blocks. You can also use CSS classes.

A locked link works as described above. A locked submenu (a link with children) is hidden instead, because its nested links can't be safely stripped from a block's output.


Smart links go to the right place and show to the right visitors on their own — no rules to set.

LinkGoes toShows to
Log inThe login page, then back to the page the visitor was onGuests
RegisterThe registration pageGuests — and only if Anyone can register is on under Settings → General
Log outLogs the visitor outLogged-in users
My accountTheir Sepodesk membership account pageLogged-in users
Become a memberThe membership join pageEveryone

Adding them — classic menus

  1. Go to Appearance → Menus.
  2. Find the Sepodesk links box on the left. If it's missing, open Screen Options at the top of the page and tick Sepodesk links.
  3. Tick the links you want and click Add to Menu.
  4. Rename them if you like, then Save Menu.

Adding them — anywhere else

Add a Custom Link (or a Navigation link in a block theme) with one of these as the URL:

#sp-login
#sp-register
#sp-logout
#sp-account
#sp-join

Overriding the defaults

Setting Show to on a smart link overrides who sees it. For example, set Become a member to Guests only to hide it from people who are already signed in.

After logging out, Sepodesk sends visitors to its own logout page and then the home page, rather than back to the page they were on. This keeps the WordPress and Sepodesk sessions in step.


Blocks

Every block — paragraphs, images, groups, columns, buttons, Navigation links, and blocks in Appearance → Widgets — has a Sepodesk visibility panel in the block sidebar.

  1. Select the block.
  2. Open Sepodesk visibility in the right-hand sidebar. Its title shows the current rule, e.g. Sepodesk visibility: Logged in · Gold (locked).
  3. Set the rule exactly as for menu items.
  4. Update or publish the page.

To control a whole section, put it in a Group block and set the rule on the group.

Blocks with a rule get a faint dashed outline in the editor, so you can spot them at a glance. In the editor every block stays visible; rules only apply on the live site.

Classic (non-block) widgets don't have the panel. Switch the widget area to blocks, or wrap the content in a block widget.


CSS classes

A shortcut that works on classic menu items and on any block.

ClassEffect
sp-logged-inLogged-in users only
sp-guestsGuests only
sp-role-editorUsers with the editor role. Repeat for more: sp-role-editor sp-role-author
sp-tier-goldHolders of the gold tier or higher
sp-lockedWith a tier class: show locked instead of hiding

Use the role slug (editor, author, subscriber, administrator). sp-role-admin also works for administrator.

Where to type them:

  • Classic menus: tick CSS Classes under Screen Options, then fill in the CSS Classes field on the item.
  • Blocks: select the block, then Advanced → Additional CSS class(es).

If an item or block has both the visibility box/panel and classes, the box/panel wins where they disagree, and role lists from both are combined.


Recipes

Add Log in, Register, My account and Log out from the Sepodesk links box. That's it — guests see the first two, signed-in visitors the last two.

Members' area that sells itself

Menu itemTierLocked
Members' downloadsGold✓
↳ Templates——
↳ Recordings——

Guests see 🔒 Members' downloads linking to log in. Silver members see it linking to the join page. Gold members get the real link and its submenu.

A teaser on a public post

  1. Write the intro as normal.
  2. Put the rest of the post in a Group block.
  3. Give the group Tier: Gold and Show locked instead of hiding.

Everyone reads the intro; non-members see a lock card where the rest would be.

A banner only for guests

Add a Group with your call-to-action and set Show to: Guests only.

Staff-only tools

Menu itemRoles
Editorial calendarEditor, Author

Hiding is not protection

Hiding or locking a menu item or block removes it from the page. It doesn't stop anyone who knows the URL from visiting the page it pointed to.

To actually protect a page or post, use the Sepodesk Membership box on the post itself (or require_membership on a docs page). Use visibility rules to shape what people see; use the membership gate to protect content.


Troubleshooting

Signed-in users see the guest version. A full-page cache is serving the same HTML to everyone. Make sure your cache plugin (LiteSpeed Cache, WP Super Cache, Cloudflare APO, etc.) bypasses the cache for logged-in users. Most do by default.

A tier-gated item is hidden from (or locked for) everyone except admins.

  • Check the member's plan is active. A manual, cash or bank payment stays pending until an admin confirms it, and pending members don't pass.
  • If the membership data can't be loaded, tier-gated items behave as if the visitor doesn't have the tier.

A tier shows "(missing)". That tier was deleted or renamed. Pick a current tier, or — None —, and save.

A role-gated item never appears. Use the role slug (editor), not the display name (Editor). Roles that no longer exist are dropped when the menu is saved.

The Register link never appears. Registration is off. Turn on Settings → General → Membership: Anyone can register.

The Sepodesk links box isn't on the Menus screen. Open Screen Options at the top of Appearance → Menus and tick Sepodesk links.

The Sepodesk visibility panel isn't in the block sidebar. The editor script hasn't been deployed (public/wpjs/blocks/sp-block-visibility.js). Rules already saved on blocks keep working; only the panel is missing.

A child item appears even though I hid it. Children are hidden automatically only when their parent is hidden or locked. Hiding a child doesn't affect its parent or siblings.