How To Remove A Menu Item From Wagtail Settings Menu09 Oct · by Tim Kamanin · 1 min read
Let's say I want to remove the User menu item from Wagtail settings menu.
All I need to do is to put this hook into
wagtail_hooks.py file of my Wagtail CMS app:
from wagtail.core import hooks @hooks.register('construct_settings_menu') def hide_user_menu_item(request, menu_items): menu_items[:] = [item for item in menu_items if item.name != 'user']
Start the Django server, and you should see no User menu item under Settings.