Control Access to Full-Site Editing Navigation Menus

In the last few months, there have been big changes in how you create navigation menus in WordPress. Those changes are a result of the new “Full-Site Editing” feature.

The PublishPress Capabilities plugin allows you to control access to both the old and the new navigation menus. For example, you can show a “Log in” link to your site visitors, but hide it from logged in users. You can also do the opposite and show a “Log out” link only to registered users.

In this tutorial, I'll explain the differences between the old and new WordPress menu systems. I'll also show you how to control access to links in both systems.


Old and New WordPress Navigation Systems

For many years, WordPress had a “Menus” screen which allowed you to create navigation for your site visitors. This screen was available by going to “Appearance” and then “Menus”.

The screenshot below shows the old system. You could edit all of your menus from this single screen.

If you are using a new block-based WordPress theme, you will no longer see this “Menus” link. A good theme to test this with is the default Twenty Twenty-Three theme. With a block-based theme, you have to visit “Appearance” and then “Editor”.

In this new approach, each navigation menu is now a block. You edit each menu individually using the “Block” settings in the sidebar, as in this image below:


User Access to Navigation Menus

The “Nav Menus” screen in the PublishPress Capabilities plugin allows you to block access to frontend menu links in WordPress.

This is helpful because neither the old or the new menus systems give you avway to control the visibility of your links. First, let's see how to control access using the old menu system.

  • To start changing access to menu links, go to “Capabilities”, then “Nav Menus”.
  • Look in the top-left corner for the user role you want to edit:
User dropdown for Nav Menus screen
  • If your website has menu links, you will see them in the main area of this screen, as in this image below:

In the image below, users in the “Author” role will not be able to see or use any of the menu links marked in red.

Menu Blocked

In addition to blocking access for user roles, you can also block access for all “Logged In Users” and all “Logged Out Users”.

Logged In Logged Out

The “Nav Menus” screen does work slightly differently for the new menu system. In addition to controlling access to menu links, PublishPress Capabilities can also control access to some blocks that are placed inside menus. The supported blocks include Site Logo, Social Icons, Search, and Page List. The Full-Site editing menus will appear as in this screenshot below. In this image, you can see a mix of page links and blocks.

Author

  • Steve Burge

    Steve is the founder of PublishPress. He's been working with open source software for over 20 years. Originally from the UK, he now lives in Sarasota in the USA. This profile is generated by the PublishPress Authors plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *