I made a custom navigation page for users, using the plugins.php file. But I would like this page/option to be only available for some types of users; and make it the default landing page for them.
I can't figure out how to that.
I tried to make it the default landing page, and in the plugins template file, adding a condition that redirect users depending on their type... but redirection doesn't work by there it seems.
Any clue, plz?
I'm using Wordpress 5.8.2 and Buddypress 9.1.1. Thanks
I found a solution.
First, here's how I created a new navigation item; I put this code in my
bp-custom.phpfile:After I created a new directory in community/members/single in my theme directory, and in this directory I will put my newnavitem loop and edit template files.
And I linked the newnavitem and its template with this function
And here's how I disabled the current nav item for certain user types, and set it as default landing page for another certain user types.