If you unpublish a page or post, it still appears in your custom menus. This plugin automatically prevents pages/posts set to “draft” or “pending review” from appearing in custom menus on the site, while keeping their place in the menu structure. When they’re published, they’ll appear in the menu automatically.
This plugin also modifies the custom menu editing screen to clearly indicate the unpublished status of items in the menu.
NOTE: We are aware of a limitation in the plugin, that a page/post must be published to appear in the list of items you can select to add to the menu. We are working on a solution. In the meantime, the workaround is to temporarily publish the page/post, add it to the menu, and then set it back to “draft”.
- Upload the plugin files to the
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- There’s no step 3!
Contributors & Developers
“Hide Drafts in Menus” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Added global
$r34hdm_resultsvariable to eliminate duplicate queries, resulting in a slight performance increase.
- Updated “tested up to” to 5.8.1.
- Fixed bug that would return a PHP warning if the menu is empty. In some cases this may have been breaking the page preview in the Customizer.
- Updated “tested up to” to 5.3.
- Added rekey array of menu items after removing hidden items.
- Added ‘future’ status to pages hidden in menus.
- Fixed database error message that occurred when there were no unpublished items.
- Added ‘trash’ status to pages hidden in menus.
- Fixed issues that would trigger PHP notices on Appearance > Menus page.
- Tested with WordPress 4.9.5.
- Updated “Tested up to” to 4.7.
- Added note about pages needing to be published temporarily to appear in the list of options.
Initial release in WordPress Plugin Directory.