Yes, you can. To do this you first need to install the Nav Menu Roles plugin. This plugin is required because it allows you to choose whether or not to display menu items based on the user’s role and whether the user is logged in or not. Why is this not built in to Link? Well, it could be, but due to a limitation in WordPress only one plugin can hook into the admin menu. I think is far better to work with Nav Menu Roles since it is already widely used and supported.
After you have installed the Nav Menu Roles plugin go to the WordPress Menus admin page and click the Custom Links panel. The panel will display the URL and Link Text options.
In the Link Text field you would add the text that you wish to be displayed in the menu. Since the “View My Directory Entry” / “Add My Directory Entry” link is dependent on whether the user has been linked to an entry or not you need to supply the link text for adding and viewing the entry. You can add both titles to the Link Text field by separating them with a pipe ( | ). The text before the pipe will be used for the “View My Directory Entry” link text and the text after the pipe will be used for the “Add My Directory Entry” link text.
Tip
In the URL field leave the http://
and then add the URL token for the link you want to add. And then click the Add to Menu button to add it to your menu.
There are two URL tokens and they are:
%entry_view_url%
:: This is the URL token you will use to add the “View My Directory Entry” / “Add My Directory Entry” link to your menu.
This token will be replaced with the URL for viewing the user’s linked entry. If the user has not been linked to an entry the token will be replaced with the URL for the user to add their entry to the directory.%entry_edit_url%
:: This is the URL token you will use to add the “Edit My Directory Entry” link to you menu.
This token will be replaced with the URL for editing the user’s linked entry. If the user has not been linked to an entry the menu item will not be displayed.
Important
Here are two screenshot example which show the settings to use for adding “View My Directory Entry” / “Add My Directory Entry” and “Edit My Directory Entry” links to your menu.