Oct 09, 2019 · Updated: Jul 17, 2021 · by Tim Kamanin
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.
Hey, if you've found this useful, please share the post to help other folks find it: