Thank you for your help 🙂
I tested your code but still the problem remains. When the logged in user is ‘author’ and he visits a profile page of a ‘subscriber’, the nav_item is getting removed from his own profile dropdown menu.
Following, when a ‘subscriber’ visits a profile page of an ‘author’ he can see the nav_item registered on his own profile dropdown menu.
Thank you very much for your reply 🙂
My theme is using a profile dropdown menu very similar like in your website https://ibb.co/641Q022.
I would like to create this tab just for 3 user roles (for example ‘editor’, ‘administrator’, ‘author’).
So basically everybody can see this tab on those 3 users profile,but only those 3 user roles have it.
But when the logged in user is ‘author’ and he visits a profile page of a ‘subscriber’, the nav_item is getting removed from his own profile dropdown menu.
If you wish i can give you access to a stage site of mine to see the result.Please let me know.
Thank you very much for your kind help.
I will cleanup the second part as you mentioned. However my main problem is about the certain roles tab creation.
Your code works correct as expected but there is one problem. When the user with role ‘editor’ visits a profile page of a user that is not in the ΄allowed roles΄ (for example with role ‘subscriber’) then the nav_item is getting removed also for him (that it shouldn’t, since he is with role ‘editor’).
I can see that because my theme has a drop-down profile menu in the right top corner section of the page, so this item is getting removed for the current logged in user. https://cdn2.wpbeginner.com/wp-content/uploads/2020/04/creating-a-submenu-1.png
I hope you could understand what i am trying to say 🙂
- This reply was modified 2 months, 1 week ago by Lefteris.
Thank you for your reply and your patience 🙂
You don’t need to check my second question.I got to display the categories correct.
I am just trying to register this nav_tab only for specific roles.I have tried to use your code example here https://buddydev.com/support/forums/topic/profile-tabs-depending-to-user-role-or-member-type/#post-11773 but is not working exactly as it should.
Please let me know when you have a check.