# menu-by-user-roles

Welcome to the official GitHub repository for "Menu By User Roles," the ultimate WordPress plugin for custom menu management based on user roles.

## Features

- **Multiple user role selection** - Support for assigning multiple roles to a single menu item.
- **Block Editor (Gutenberg) support** - Full compatibility with WordPress block navigation.
- **Unauthenticated user targeting** - Specifically show/hide menus for logged-out visitors.
- **Dynamic role detection** - Automatically detects all available user roles in your WordPress site.
- **Secure implementation** - Built with WordPress security best practices and nonce verification.
- **Conflict-free operation** - Namespaced to avoid conflicts with other plugins using Select2.

## Installation

1. Download the plugin as a ZIP file from [Here](https://wordpress.org/plugins/menu-by-user-roles/).
2. Log in to your WordPress admin panel.
3. Navigate to `Plugins` > `Add New`.
4. Click the `Upload Plugin` button and select the ZIP file you downloaded.
5. Activate the plugin.

## Usage

1. After activating the plugin, go to the `Appearance` > `Menus` section in your WordPress dashboard.
2. Edit a menu item and you will find a new option to assign user roles.
3. Choose the desired user roles for the menu item.
4. Save the menu.

## Screenshots

![Screenshot 1](assets/screenshots/menu-by-user-roles-screenshot.png)

_*Here is an example of a menu item with user role selection options.*_

![Screenshot 2](assets/screenshots/menu-by-user-roles-block-navigation.png)

_*Example of a menu item with user role selection options in block navigation.*_

## Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

## License

This project is licensed under the [GNU General Public License v2 or later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).

## Author

[Kahnu044](https://github.com/kahnu044)
