Assign Group to a Custom Menu Item

Hi Guys

How can I assign a group to a particular custom menu item so that only that particular group can see the custom menu item in the menu?

The custom menu item has a post type of Navigation Menu Item “nav_menu_item”

5 Responses to Assign Group to a Custom Menu Item

  1. George January 23, 2024 at 6:47 pm #

    Hey Mark,

    Yes in order to to adjust the header template, your theme should support FSE. Otherwise, you can create the aforementioned structure even on a single page with the Block editor.

    Kind regards,
    George

  2. George January 22, 2024 at 1:08 pm #

    Hi Mark,

    With the Classic Menu found under Appearance > Menu, there are technical limitations in WP core, that prevent Groups restrictions to be applied on a menu item.
    The workaround I mentioned refers to Full Site Editing and blocks, where once you add the Groups Member Block, inside it you can add the Navigation block(or any other block) and this way choose who will be privileged to view the containing block.

    Kind regards,
    George

    • Optuma Pty Ltd January 22, 2024 at 9:50 pm #

      Hi George

      I understand now. My Theme is not a Full Site Editing Theme. So I guess there is nothing your plugin can do to help.

  3. Optuma Pty Ltd January 19, 2024 at 2:02 pm #

    Hi George

    I dont quite follow. Where do I place the Group Members Block? It seems this is a block you use when creating a Page or a Post. I’m working with my Main Menu. I have a menu like this

    HOME FORUM
    |_GROUP 1 FORUM
    |_GROUP 2 FORUM
    |_GROUP 3 FORUM

    Each one of those sub nav_menu_items is a custom URL link going to an external forum website we have.

    I need to make sure members of GROUP 1 only see GROUP 1 FORUM sub menu item….and so on

  4. George January 19, 2024 at 11:37 am #

    Hi Mark,

    Welcome to our support forum and many thanks for using our software on your site.

    What you can do in order to restrict visibility of a menu item, is by using the Groups Member block,inside of which you will place the Navigation block(WP Core block). The Groups Member block will handle the group restriction and the Navigation block will be used for a new menu containing the menu item you wish to restrict visibility.

    Basically the result would be a second menu with its own menu item(s), which will be restricted by the chosen group.

    Kind regards,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share