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 shows or hides menu items depending on whether a contact is signed in (the part worth understanding). 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: Properties, Open Houses, Agents, Office, My Listings, My Notes, My Appointments, and Profile, plus a Log in item.
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, at /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, the personal account items appear only to signed-in contacts: Profile, My Listings, My Notes, and My Appointments. The Log in prompt does the reverse, appearing only to signed-out visitors.


Same page, same menu. Only the login state differs. Signed out, the visitor sees the public sections and a Log in prompt. Signed in, the personal items and Profile appear, 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 account items and the Log in trigger are tagged automatically. You don’t class them by hand. Barbican recognises the account pages (Profile, My Listings, My Notes, My Appointments) and the Log in trigger, and adds the right class server-side, so it’s already 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-infor items visible only to signed-in contacts, orbarbican-auth-outfor items visible only to signed-out visitors.
-
Save. The item now toggles with the visitor’s login state, with no plugin code and 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, so there’s nothing to
configure.
The menu points at pages. Next, Pages & Repair pages covers the pages Barbican creates, how they’re assembled, and the one-click repair if any go missing.