[wp-trac] [WordPress Trac] #13822: Menu items that get unpublished still appear
WordPress Trac
noreply at wordpress.org
Sat Apr 18 19:17:16 UTC 2026
#13822: Menu items that get unpublished still appear
-------------------------------------------------+-------------------------
Reporter: nacin | Owner: nacin
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Menus | Version: 3.0
Severity: normal | Resolution:
Keywords: good-first-bug has-test-info has- | Focuses:
patch |
-------------------------------------------------+-------------------------
Comment (by alechgm):
I have tested this patch on a fresh WordPress core development environment
using Docker.
Environment details:
- WordPress Version: 7.1.0-alpha
- PHP: 8.3.30
- Theme: Twenty Twenty (Classic Theme)
- OS: Windows (WSL2)
Steps taken:
1. Created a new page named "Ghost Page" and set it to 'publish'.
2. Created a custom menu, added "Ghost Page" to it, and assigned it to the
'Primary' location.
3. Changed "Ghost Page" status to 'Draft'.
4. Verified that the menu item remained visible on the frontend (bug
confirmed).
5. Applied the patch to `src/wp-includes/nav-menu.php`.
6. Verified that the "Ghost Page" menu item is now correctly hidden from
the frontend for non-logged-in users.
The patch works as expected and prevents unpublished content from
cluttering the navigation menus.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/13822#comment:61>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list