Hello, Netreneris.
Apologies for the waiting.
I’ll put you in contact with the dev team.
They will get in touch ASAP.
Thanks for your question and have a nice day.
Hi @netreneris,
Sorry for the delay. I’m having difficult to understand the logic on your code, below I will break down of the inconsistencies I found it:
On the first part of the code you are validating the user role of the current users, if the user doesn’t have the role “contributor” you are skipping the process. However, after this validation, you are using another validation to check if the user is logged in, only when the user is not logged you’re removing the navigation tab, what doesn’t make sense because not logged-in users doesn’t have roles.
Maybe you can bring more details on what you are traying to do, that would be handy for us.
I will be waiting for your reply.
Hello Jairo,
thanks for your reply. I do not know the coding and that code I found on the forums. 🙂 On my website is two membership level – silver (wp-contributor) & gold (wo-author role). Website visitors can contact via email to the members who have a Gold membership, and can’t connect with a member who has Silver membership. Members with Silver and Gold membership can post articles and these articles are shown on their profile’s tab (I’m using buddyboss theme&plugin). With the code below I achieved that only member with contributor role, doesn’t have “Contact-me” tab on their profile but then I get an 404 error when visiting articles tabs. You can check by yourself.
Gold member https://www.epsychology.app/therapists/ugne-juodyte/
Silver member https://www.epsychology.app/therapists/birute-flemming/
Hello @jnfdev, do you have any ideas how to fix that?
Hello @netreneris,
I did a test and I can confirm that once I use the function bp_core_remove_nav_item I start getting 404 on all the BuddyForms integrate tabs, In order to give you a good answer, I will need to do a more deeply research. I will deep dive and once I have any update I will back you.
Thank you for your patient, have a nice day.
Hi @netreneris,
I have an alternative solution that you definitely should try. If you are using a contact form you can manage the visibility by restricting the creation permission from the Form Builder, see this image: https://prnt.sc/13xtnrf
As you can see in the image you can check or uncheck permissions per user role, so what you have to do is just checking the user role you wanna see the form (checking the create checkbox) and let other ones as uncheck.
Let me know if you got the point or if you have any question left. Have a nice day.
-
This reply was modified 3 years, 11 months ago by
Jairo Niño.