How would I create a menu so lets say user1
sees user1
‘s menu and not user2
. Or just see their own pages which I assigned to them in a menu.
So not user role menu but a username menu.
How would I create a menu so lets say user1
sees user1
‘s menu and not user2
. Or just see their own pages which I assigned to them in a menu.
So not user role menu but a username menu.
You must be logged in to post a comment.
As said in the comments, this depends on how many users there are and how different those menus are supposed to be.
If there are just a few users and you want completely different menus for each of them, you would have to create different menus in the backend and the call them conditionally in your theme template like this:
If there are many users and you want to include systematic information, such as a link to their author archive or information from their profile, your best bet may be to define no menu at all and let the menu be generated by a fallback function. So you would have:
In the fallback you can generate your own structure of
<li>
elements and include, for instance, links towww.example.com/author/ . $current_user->user_login
.