# How to remove a menu item if user has a certain role

**URL:** <https://forum.wixstudio.com/t/how-to-remove-a-menu-item-if-user-has-a-certain-role/62030>\
**Category:** Ask the community\
**Tags:** wix-members-area, code, question\
**Created:** [August 19, 2024, 11:46am UTC](https://forum.wixstudio.com/t/how-to-remove-a-menu-item-if-user-has-a-certain-role/62030 "2024-08-19T11:46:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smens](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/smens/32/22939_2.png) [@smens](https://forum.wixstudio.com/u/smens)\
**Post date:** [August 19, 2024, 11:46am UTC](https://forum.wixstudio.com/t/how-to-remove-a-menu-item-if-user-has-a-certain-role/62030/1 "2024-08-19T11:46:45Z")

</div>

**Question:**  
After a user is logged in the menu shows the members pages. I want to exclude a menu item if a user has a certain role. Anybody got an idea how to achieve this? I know how to remove or add menu items in general, but I dont know how I can set this up by a certain condition (such as the role of a member).

---

<div class="post-metadata">

**Author:** ![Dan\_Suhr](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dan_suhr/32/94074_2.png) [@Dan\_Suhr](https://forum.wixstudio.com/u/Dan_Suhr)\
**Post date:** [August 19, 2024, 10:40pm UTC](https://forum.wixstudio.com/t/how-to-remove-a-menu-item-if-user-has-a-certain-role/62030/2 "2024-08-19T22:40:48Z")

</div>

This document should lead you in th eright direction

> **[Get Roles | VELO](https://dev.wix.com/docs/velo/api-reference/wix-members-frontend/current-member/get-roles)**
>
> Retrieves the member's roles. The getRoles() function returns a Promise that resolves to the roles of the currently logged-in member. If no member is currently logged in, the Promise is rejected. Notes: - The member data in the resolved promise will...
