Skip to main content
Home
GrN.dk

Main navigation

  • Articles
  • Cases
  • Services
  • Your Digital Project Manager
  • About Greg Nowak
  • Image Gallery
  • Contact
User account menu
  • Log in

Join my community / free newsletter — sign up here

Breadcrumb

  1. Home

WordPress headless menus need an exposure check before launch

Illustrated infographic summarizing: WordPress headless menus need an exposure check before launch

By Greg Nowak. Last updated 2026-06-28.

WordPress 6.8 gives headless and decoupled teams a cleaner way to handle something that used to be awkward: getting menu data from WordPress into a custom front end.

That is useful. A React, Vue, Next.js, or other front-end application should not need hard-coded navigation, a copied config file, or a one-off endpoint just to render the primary menu. If WordPress is the content system, navigation usually belongs there too.

The catch is that menu data is still data. It may look like simple navigation, but it can reveal how a client’s site is organised, which product areas are coming, what internal labels teams use, where campaign pages sit, and which account, support, checkout, partner, or documentation paths the front end expects.

In a traditional WordPress theme, menus are normally rendered into final HTML. In a headless build, the API response becomes part of the application contract. Before launch, that contract needs a quick but serious exposure check.

The WordPress 6.8 change is deliberately controlled

The important detail is that public menu access is opt-in. WordPress 6.8 introduced the rest_menu_read_access filter so developers can expose menus, menu items, and menu locations through the REST API. Core keeps those menu resources private unless the filter is used.

That is a sensible design. It helps headless projects without suddenly making every navigation object public on existing sites.

The risk is less about WordPress core and more about rushed implementation. A team needs the primary menu in the front end. Someone adds the filter. It works in development. Then the launch configuration quietly becomes broader than the application actually needs. The Make WordPress developer note shows that exposing all menus is possible with a single filter, but possible is not the same as appropriate for a client site.

Why menus deserve a proper look

The WordPress REST API is a structured JSON interface for content and application data. The handbook describes use cases including client-side JavaScript applications, mobile apps, desktop tools, and programs outside PHP. That is exactly why headless WordPress projects depend on it.

Once the CMS and front end are separated, small exposure choices become architectural choices. A public menu endpoint may be readable by browsers, crawlers, preview tools, monitoring services, and anyone who knows the URL. The practical question is not only whether a page itself is public. It is whether the navigation response discloses more than the front end needs to know.

That can happen in ordinary ways. A staging link stays in a menu because editors were testing a flow. A future product section uses an internal label that should not be visible yet. A menu item points to a partner portal, gated support area, checkout route, or documentation section. The page permissions may be correct, while the menu response still publishes the label, URL pattern, hierarchy, and existence of that structure.

Check What to look at Business reason
Endpoint scope Confirm only the required menus, menu items, or menu locations are public. WordPress 6.8 supports selective access, so broad exposure should be a conscious launch decision.
Logged-out access Test the same requests as an anonymous visitor, not only as an admin or preview user. The public API contract is what browsers and third parties can actually read.
Menu content Review labels, URLs, hierarchy, staging links, placeholders, and planned campaign areas. Navigation can reveal roadmap, operational, or integration details before the page content is exposed.
CORS configuration Check that the intended front-end origins are allowed and old preview or development origins are not left open casually. CORS shapes what cross-origin browser scripts can read from the WordPress API.
Cache behaviour Identify where menu API responses are cached and how they are purged. A corrected menu can still leak for a while if stale JSON remains in cache.
Ownership Document the exposed endpoints, plugin-added fields, API versions, and launch rule. OWASP treats API inventory and misconfiguration as real API security concerns, not admin paperwork.
A practical pre-launch exposure checklist for WordPress 6.8 menu endpoints in headless projects.

The filter is flexible, so the policy should be explicit

The WordPress 6.8 field guide presents the REST API menu change as useful for headless and decoupled applications. The dedicated developer note adds an important implementation detail: rest_menu_read_access can use custom logic, including endpoint-level control, and receives the REST controller class as a parameter.

In plain English, teams do not have to choose between exposing everything and exposing nothing.

A primary marketing menu may be fine to expose publicly. The footer menu may be fine too. Internal utility menus, preview menus, account-area menus, or menus used to drive conditional app states may need different handling. If the front end only needs the primary menu location, exposing just that location is usually easier to defend than exposing every menu object and relying on editors never to place sensitive structure there.

This is where agency delivery habits matter. Navigation often gets finalised late. Several people may edit it. The front end may be built by one team while WordPress configuration, plugins, caching, hosting, and deployment are handled by another. Without a written exposure rule, the API can drift away from what the application actually needs.

Authentication does not solve every exposure decision

WordPress supports several REST API authentication patterns. Cookie authentication is standard for logged-in WordPress users. Nonces help protect REST requests from unintended actions. Application passwords can support authenticated requests over HTTPS. The authentication handbook also notes that plugins can provide other authentication methods for remote applications.

Those controls matter, but they do not answer the public menu question by themselves. If a menu endpoint is intentionally exposed for anonymous front-end rendering, authentication is not protecting that response. The relevant decision is whether the endpoint should be public, which menu objects it should return, and which fields should appear.

This distinction avoids a common misunderstanding in decoupled projects. A team may say the API is secured because editorial actions and private content require authentication. That may be true. Public endpoints can still reveal more metadata than expected.

OWASP’s API Security Top 10 is useful here because it separates risks such as security misconfiguration, improper inventory management, object and property authorization issues, and broken authentication. Menu endpoints are not automatically high-risk. They simply belong in the same governance conversation as the rest of the public API surface.

CORS and caching need the same discipline

In many headless setups, the browser loads the front-end application from one origin and fetches WordPress data from another. MDN describes CORS as the HTTP-header mechanism that lets a server indicate which other origins a browser may permit to load resources from it. Browsers restrict cross-origin script requests unless the response includes the right headers.

CORS is not the only access control for a menu endpoint. A public JSON URL can still be requested outside the browser. But CORS does show whether the API has been configured precisely or broadly. If production only needs one front-end origin, the launch notes should say that. If preview, staging, or local development origins are also allowed, that should be intentional and reviewed before go-live.

Cache behaviour deserves the same treatment. Navigation data is often cacheable, and caching is usually good for performance. WordPress 6.8 included wider performance improvements, and decoupled projects tend to care about fast delivery. Still, a cached menu response can preserve a mistake after an editor removes it. Teams should know where those responses are cached, how long they live, and how to purge them quickly.

What Greg would check before launch

A useful exposure review does not need to become a heavy security audit. It should be focused, practical, and tied to what the front end actually calls.

Start with the exact menu endpoints: locations, menu items, and any plugin-added fields. Test them while logged out. Compare the response with the front-end requirement. If the app only needs label, URL, parent-child relationship, and sort order, extra fields should have a clear reason to be there.

Then review the menu content itself. Remove staging links, unpublished campaign labels, placeholder URLs, and internal names. Check whether the hierarchy reveals private areas or planned sections. Confirm that the production response matches the launch checklist, not just a developer’s local setup.

Finally, document the rule in language a maintenance team can use later. For example: only the primary and footer menu locations are publicly exposed; all other menu-related endpoints remain restricted unless a future front-end change requires them.

Greg’s role would be to make that review concrete: check anonymous REST API behaviour, inspect menu endpoints, look at authentication boundaries, review CORS and cache headers, identify plugin-added fields, catch staging data, and turn the result into deployment notes. The point is not to slow down a headless launch. It is to make sure WordPress exposes exactly what the front end needs, and no more than the client expected.

Related on GrN.dk

  • Vibe-coded features need a production handoff before launch
  • Cloudflare BYOIP customers need a rollback plan, not just trust
  • OpenAI File Search Turns Messy Internal Docs Into a Real Retrieval-Governance Project

Need help with this kind of work?

Book a pre-launch REST API exposure review Get in touch with Greg.

Sources

  • WordPress 6.8 “Cecil” release post
  • WordPress 6.8 Field Guide
  • Make WordPress Core: REST API filter for public menu exposure
  • WordPress REST API Handbook
  • WordPress REST API authentication
  • OWASP API Security Top 10 2023
  • MDN: Cross-Origin Resource Sharing
Last modified
2026-07-15

Tags

  • wordpress
  • headless CMS
  • rest api
  • API governance
  • agency support

Review Greg on Google

Greg Nowak Google Reviews

 

Written recommendations from Trafik og Veje, Aarhus Municipality (2011) and AgroTech (2010) — read them on LinkedIn.

Illustrated infographic summarizing: MCP 2026-07-28 Is an Auth Migration, Not a Version Bump
MCP 2026-07-28 Is an Auth Migration, Not a Version Bump
2026-08-29

MCP’s July 2026 release removes protocol sessions and tightens OAuth. Here’s a practical plan for migrating clients, servers and enterprise access safely.

Illustrated infographic summarizing: Turn a Technician’s Voice Note into a Work Order—Not Raw Audio
Turn a Technician’s Voice Note into a Work Order—Not Raw Audio
2026-08-28

Voice input can reduce the technician’s documentation burden when hours, materials and status are validated before the information is saved in the work order system.

Illustrated infographic summarizing: ChatGPT Disabled Personal Knowledge Sync. What Broke on Your Team?
ChatGPT Disabled Personal Knowledge Sync. What Broke on Your Team?
2026-08-27

ChatGPT retired personal sync connections for Enterprise and Edu. Here is how to find affected workflows, migrate access, and test permissions.

Illustrated infographic summarizing: Cloudflare’s September Bot Defaults Could Quietly Cut AI Visibility
Cloudflare’s September Bot Defaults Could Quietly Cut AI Visibility
2026-08-26

Cloudflare’s September bot defaults give publishers more control, but one training block could also cut search crawling and AI-driven discovery.

Illustrated infographic summarizing: Does Your AI Chatbot Clearly Identify Itself?
Does Your AI Chatbot Clearly Identify Itself?
2026-08-25

The EU’s transparency requirements for AI chatbots now apply. Here is how to make your bot’s identity clear, limit its system access and provide a genuine route to a member of staff.

Illustrated infographic summarizing: Should publishers add Google’s new Preferred Sources button?
Should publishers add Google’s new Preferred Sources button?
2026-08-24

Google’s Preferred Sources button is worth a controlled test for eligible publishers, with careful choices around placement, performance and measurement.

Illustrated infographic summarizing: Search Console Can See TikTok Now. Your Reporting Has to Catch Up
Search Console Can See TikTok Now. Your Reporting Has to Catch Up
2026-08-23

Google can now report how social profiles appear in Search. Here is how to measure cross-channel discovery without mistaking visibility for business results.

Illustrated infographic summarizing: Your AI workflow has logs. Can they explain one bad decision?
Your AI workflow has logs. Can they explain one bad decision?
2026-08-22

Logs can show that every service worked while leaving a bad AI decision unexplained. See how connected traces and careful redaction close the gap.

Illustrated infographic summarizing: Security Questionnaires Eat Into Selling Time—Let AI Find the Evidence
Security Questionnaires Eat Into Selling Time—Let AI Find the Evidence
2026-08-21

NIS 2 is generating more supplier questionnaires. A controlled AI assistant can find approved answers and sources—and route uncertain cases for review.

Illustrated infographic summarizing: Locked out of your Apple developer account? Fix it before October 1
Locked out of your Apple developer account? Fix it before October 1
2026-08-20

Apple's updated developer agreement must be accepted by October 1, 2026, and many small app owners cannot even log in. Here is where Apple's two-factor codes really go, and how to fix your access before the deadline.

More articles

Built by AI — available for your business. The daily articles on this site are researched, written and illustrated by an autonomous AI pipeline. At nowa.dk I install the same kind of AI automation in businesses at fixed prices — site in Danish, English version here, and web/marketing agencies have a dedicated page.

RSS feed

Footer

  • All articles
  • Contact

GrN.dk — AI automation, web platforms, web optimization, data handling and logistics.

© 2026 GrN.dk · LinkedIn · Contact · AI automation in Danish: nowa.dk

Behind GrN.dk: Individual Entrepreneur Codecrafter · Tax ID 305669096 · Bakhtrioni St. 22, 0194 Tbilisi, Georgia · official business register