Navigation & menus
How Barbican builds your site menu, and the CSS classes that show or hide items by contact login state.
Once the theme sets the frame, navigation is how visitors move through it. Barbican builds a menu for you when the plugin sets up its pages, keeps the right item highlighted as visitors browse, and — the part worth understanding — shows or hides menu items depending on whether a contact is signed in. This page covers all three, and the CSS classes you use to extend that behaviour to your own pages.
The menu Barbican builds
Section titled “The menu Barbican builds”When Barbican provisions its pages, it also builds a navigation menu named Barbican containing them: Profile, My Listings, My Notes, Properties, Agents, Open Houses, and Office, plus a Log in item. Active add-ons contribute their own items too (Barbican Showings adds My Appointments).
The menu is created in the right form for your theme automatically:
- Block themes get a Navigation block menu the theme’s header adopts.
- Classic themes get a classic menu, assigned to the theme’s primary menu location.
The listing pages (a single property, agent, or open house) are reached through
their parent list — /properties/<id> and so on — so they’re intentionally left
out of the menu.
Auth-aware menus
Section titled “Auth-aware menus”This is the piece that sets Barbican apart. Because WordPress owns the contact identity, the server knows at render time whether the visitor is signed in — so the menu shows the right items with no client-side script and no flash of the wrong state.
Out of the box, two items toggle: Log in shows only to signed-out visitors, and Profile shows only to signed-in contacts.


Same page, same menu — only the login state differs. Signed out, the visitor sees Log in; signed in, they see Profile and the Log in prompt is gone.
How it works
Section titled “How it works”Barbican adds a class to the <body> element reflecting the login state, then ships
a tiny stylesheet that shows or hides menu items tagged with a matching class:
| Element | Class | Meaning |
|---|---|---|
<body> |
barbican-contact-in |
a contact is signed in |
<body> |
barbican-contact-out |
no one is signed in |
| menu item | barbican-auth-in |
show only when signed in |
| menu item | barbican-auth-out |
show only when signed out |
The Profile and Log in items are tagged automatically — you don’t class them by hand. Barbican recognises the Profile page (it hosts the profile block) and the Log in trigger, and adds the right class server-side, so the class is in the initial HTML.
Showing your own page to only signed-in (or signed-out) visitors
Section titled “Showing your own page to only signed-in (or signed-out) visitors”This is the common custom case: you add a bespoke page — a client resource, a members-only guide — and want its menu item to appear only for signed-in contacts. Because the toggle is driven by a CSS class, you don’t need any code: add the class to the menu item and Barbican’s stylesheet does the rest.
-
Add your page to the Barbican menu — in Appearance → Editor → Navigation for a block theme, or Appearance → Menus for a classic theme.
-
Select the menu item and open its Advanced settings.
-
In Additional CSS class(es), add one class:
barbican-auth-in— visible only to signed-in contacts, orbarbican-auth-out— visible only to signed-out visitors.
-
Save. The item now toggles with the visitor’s login state — no plugin code, no custom CSS.
Keeping the current section highlighted
Section titled “Keeping the current section highlighted”When a visitor opens a single listing at /properties/<id>, that detail page isn’t
itself in the menu — so without help, the Properties item would go dark while
they’re clearly still in that section. Barbican fixes this: on a property, agent, or
open house detail page, it adds the standard current-menu-item class to the parent
list’s menu item (Properties, Agents, or Open Houses), so it stays
highlighted exactly as it does on the list page. This works on block and classic
themes alike, and uses the theme’s own active-item styling — nothing to configure.
The menu points at pages. Next: Pages & Repair pages — the pages Barbican creates, how they’re assembled, and the one-click repair if any go missing.